Prompts with date

Hello,
I need a help how to react for two various inputs in prompt. Here it is.
(in Webi) I have two prompts for user that require enter number of month (Jan -> 1, Feb -> 2 u2026) and number of year. After that report shows results (revenues) for entered month and the previous month in entered year! (user enters 3 and 2008 and report shows results for Mar and Feb in 2008). Problem occurs when user enter 1 as month. So that I need report of Jan and report of Dec of previous year. I though CASE can solve it, I tried it but without success. Maybe bad syntaxe, maybe bad solution.
My suggestion:
I have two prompt. One for month and one for year.
I tried SELECT ... WHERE u201CPK=PKu201D u2026 AND
order_revenues_year = @prompt(for year)
and
order_revenues_month = CASE WHEN @prompt(for month) = 1 THEN ( 12 AND @prompt(for year)-1 ) ELSE @prompt(for month)
I hoped for this: (for example)      entered 3 and 2008 -> reports of Mar and Feb 2008.
Thank you very much for your answer,
Marika
                                                entered 1 and 2007 -> reports of Jan 2007 and Dec 2006

Hi Marika
I have not tested this but try this code...
SELECT.....
WHERE PK=PK AND
(order_revenues_year = (SELECT CASE WHEN @prompt(for month) = 1 THEN @prompt(for year) - 1 ELSE @prompt(for year) END OR order_revenues_year = @prompt(for year)) AND
(order_revenues_month = (SELECT CASE WHEN @prompt(for month) = 1 then 12 ELSE @prompt(for month) END OR order_revenues_month = @prompt(for month)) 
Hope this helps
Jacques

Similar Messages

  • Create prompt with date-filter and initialize it with current date

    Oracle BI 11 g
    Hi!
    I need to create dashboard prompt with date-filter and initialize it with current date. How can I do that?
    I tried to create repository initialization block and add variable. But I don't know what should I write to DataSource? I tried to use functions Now(), Current_Date, sysdate (for example, SELECT Now() FROM tbl_Calendar) but without results - when I pressed "Test..." button I got errors - something like "Now() is unknown function" or "Incorrect syntax near key word Current_Date".
    After that I tied to use Presentation Variable in Prompt, but also without success ((
    Please, help me.

    I've created Repository Variable "CurrentDate", using SQL-query like this "select convert(varchar(10), getdate(), 104)" and now this variable is being initialized by value "07.04.2011". But I don't understand how to use this varible in DashboardPrompt! What item in list "Default selection" I should choose - "Variable Expression", "Server Variable" or something else? When I chose "Variable Expression" and write "CurrentDate" I got just string "CurrentDate" when preview Prompt. @{CurrentDate} gave me the same result.

  • Project Online - offline project plan prompts for date range to be entered when accessing Resource Usage view

    When I save a project plan to my local computer from Project Online and open it up in an offline mode and access Resource Usage view I get prompted with Date Range dialog boxes with the first one saying "Show resources/assignments that start or finish
    after:" and the second one with "And before:".
    I don't have any filters that are setup in Project Online that are not available in offline mode to trigger these prompts.
    Please let me know what could be causing the date range prompts. Thanks.

    Hi,
    You probably retrieve an enterprise filter into your local file. Just open the organizer from MS Project, go to the filter tab (be sure to have your project selected in the drop down menu at the top left of right of the organizer) and delete the date range
    filter.
    Hope this helps,
    Guillaume Rouyre, MBA, MCP, MCTS |

  • Problem with date format when ask prompt web-intelligence

    Bo XIR2 with 5 SP. Instaled on Windows 2003 with support Russian.
    Inside BO every labels, buttons - use russian. But when invoke web-report and Prompt appear there is problem with date format.
    Looks like korean format of date 'jj.nn.aaa H:mm:ss'.  I see system settings of date in Win .. everything right
    What i have to do?
    Where i can change format date for bo?

    GK, try this...
    decode(instr(packagename.functionname(param1 ,param2),'2400'), 0, to_date(to_char(to_date(rtrim(packagename.functionname(param1 ,param2),'(PT)'), 'Month dd, yyyy "at" hh24mi'),'mm/dd/yyyy hh24mi'),'mm/dd/yyyy hh24mi'),
                                                                      to_date(to_char(to_date(rtrim(packagename.functionname(param1 ,param2),'(PT)'), 'Month dd, yyyy "at" "2400"')+1,'mm/dd/yyyy "0000"'),'mm/dd/yyyy "0000"'))-Marilyn

  • Issue with Date prompt Format

    Hi Guys,
    help me..pls
    i have created one date prompt with calendar input, the date format in that prompt is like '03/15/2013' but i need to show the date format like '2013-03-15' . when i try to convert the date format, the user input calendar popup is not enabling only text box is appearing to give date input.
    can any one guide me any work around..pls

    Hello,
    Check this one : http://obiee10grevisited.blogspot.com/2012/02/customizing-obiee-calendar-display.html
    Mark if helps.
    Thanks,
    SVS

  • How to declare a bind variable with 'date' data type in command prompt?

    how to declare a bind variable with 'date' data type in command prompt?
    sql>variable q date;
    when i execute it show list of datatypes

    Hi,
    As Lokanath said, there are no DATE bind variables.
    You can use a VARCHAR2 bind variable, and convert it to a DATE in your SQL statment.
    If you're using SQL*Plus, consider a substitution variable. It won't be as efficient as a bind variable, but it will be as convenient.
    For example:
    DEFINE  first_entrry_date = "DATE '2010-06-20''
    SELECT   ...
    WHERE   entry_date >= &first_entry_date
    {code}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Invalid Year error when refreshing the report with date prompt

    Hi All,
    I am working on BO XI 3.1 with Informix database.
    When refreshing the report without any date prompt the report is running fine,but when applying the date prompt it is giving the error message
    "Invalid year in the date".
    I have tried changing the value in the advance tab of the object property to 'yyyy-mm-dd hh:mm:ss'
    But it also din't work for me.
    Please suggest.
    Thanks and Regards,
    Rishabh

    Hi Experts,
    Thanks for your suggestions.
    Since changing the PRM file was not a fesiable solution for us.
    We have manged to find a work around to solve this issue
    We have created the filters at universe level with following formula for all the date objects which we ere using at report level as a prompt:
    @Select(classname\objectname)=TO_DATE(@Prompt('Enter Date:','D',,mono,free,not_persistent), '%Y/%m/%d')
    Although when we parse this formula it wil give an error message saying 'illigle operation',
    still it will work when we use this at report level.
    Thanks and Regards,
    Rishabh

  • Creating Date Prompts with "in between" operator

    hi,
    I have gone through the below forum
    http://oraclebizint.wordpress.com/2008/02/26/oracle-bi-ee-101332-between-prompts-for-date-columns-using-presentation-variables/
    I have done all the steps as shown in the forum but I used calendar control instead of drop down list and it displayed the following error:
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 46047] Datetime value 4/4/1998 12:00:00 AM000000000 from 4/4/1998 12:00:00 AM000000000 does not match the specified format. (HY000)
    Can anyone suggest me an appropriate solution as it is my project requirement.
    thanks in advance
    naresh

    Hi,
    I cast the date column AS DATE again it displays the following error
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 46046] Datetime value 4/2/1998 does not match the specified format. (HY000)
    How to cast date column to timestamp (ddmm-yyyy 24hr:00:00) format
    Thanks in advance
    naresh

  • Unable to Connect Oracle 7 with Data Services 3.2

    Hi All,
    I am incredibly facing an issues with Oracle 7 connecting with Data Services 3.2. with Native client drivers (TNS Names).
    The client legacy application is on Oracle 7, they are moving the data from legacy to SAP ECC. My role is to transfer the data from Oracle 7 to SAP ECC, We are using Data Services 3.2 for conversion. This Data Services 3.2 is not connecting with Oracle 7 by using oracle native drivers (TNS Names).
    I am able to connect Oracle 8 client with SQL *Plus, but with Data Services its not connecting, I am able create Data Store but when try to import the table the error message I am getting like "ORA-24316: Illegal handle Type"
    Is there any other solution for this to connect, or Is Data Services 3.2 will not connect to Oracle 7 since its older version.
    Please reply with your thoughts, or with some solution.
    Appreciate your prompt reply. Many thanks.

    Hi Paul,
    Currently I am using ODBC connection to read the data from legacy Oracle7, but ODBC is very very slow, queries are taking hours to fetch the data. Is there any other solution by chance... I read that DataDirect is the one can connect to any versions of oracle and its bit faster, is that true. Please clarify me. If that is the solution where can I get this DataDirect drivers for oracle 7? Please advice me.
    Thank  You,
    Ashok

  • Calendar prompt for Date variable from bex

    Hi All,
    I have a Bex query where I have a variable on 0CALDAY
    - Customer exit (i_step = 1 to populate with current date)
    - Single value
    - Mandatory
    I created universe on this query and in webI selection screen i do see the variable prompt.
    I am not able to see the current date populated automatically since exit values are not populated to WebI at runtime.
    My problem is that in WebI selection screen we get list of date values from the info provider instead of Calendar prompt
    where user can enter the values directly.
    I am currently on BO XI 3.1 SP3.
    Is there any specific setting in Universe or bex query which is required to get this Calendar prompt instead of list of values for dates?
    Note: When we were on SP1 the universe created then had same variable from bex and it still shows us Calendar prompt but ever since we upgraded to SP3 for the query splitter functionality we not able to get the calendar prompt for date variable in new universe we create
    Thanks
    Ritesh

    Yep.
    Now tell me how you want to show that Prompt @ WebI report level.
    My problem is that in WebI selection screen we get list of date values from the info provider instead of Calendar prompt
    where user can enter the values directly. Exactly, i didn't get this??
    @Prompt:
    You have flexibility to show options like:
    Mono/Multi: User can select Single value or Multiple.
    BW Variable: Same we have (Single/Multiple)
    Free/Constrained: User can Enter his/her value directly or No change option.
    BW Variable: By defalut you will get this, once you made it to Optional input.
    Persistent/Not_Persistent: Refreshed report has to show last selected value means use Persistent otherwise Not_P.
    By seeing the Prompt syntax , I can say your Variable is after Customer Exit, Correct??
    Workaround for your Problem is:
    <FILTER KEY="ZV_DATE"><CONDITION OPERATORCONDITION="Equal"><CONSTANT TECH_NAME="@Prompt('Date (Previous Day)','A','Date\LovDate (Previous Day)Base',mono,primary_key)"/></CONDITION></FILTER>
    You have to remove that Date class and objects from prompt syntax. Because of that it showing up LOV's not calendar.
    Like:
    <FILTER KEY="ZV_DATE"><CONDITION OPERATORCONDITION="Equal"><CONSTANT TECH_NAME="@Prompt('Date (Previous Day)','A',',mono,primary_key)"/></CONDITION></FILTER>
    Why, It should be blank??
    Because Date needs no class\object to show up, by default you will get Calendar on the fly.
    Hope you got my point.
    Thank You!!

  • Calling a package procedure with Date parameter only

    Hi All,
    Please help me to call a package procedure with Date parameter from sql prompt.
    Arif

    Check the below procedure.
    SQL> ed
    Wrote file afiedt.buf
      1  create or replace procedure procdate (p_date_in date)
      2  is
      3  p_date_out date;
      4  begin
      5  p_date_out := add_months(p_date_in,6);
      6  dbms_output.put_line(p_date_out);
      7* end;
    SQL> /
    Procedure created.
    SQL> exec procdate('01-JAN-2010');
    01-JUL-10
    PL/SQL procedure successfully completed.
    SQL> exec procdate(to_date('01/01/2010','DD-MM-YYYY'));
    01-JUL-10
    PL/SQL procedure successfully completed.
    SQL> exec procdate('31-DEC-2010');
    30-JUN-11
    PL/SQL procedure successfully completed.

  • Creating a spool file with date/time appended to file name

    In Oracle Sql*Plus, I want to spool out a file, with the date-time stamp as part of the file name. Any idea how to do this?
    Here's what I have right now:
    SQL>
    set serveroutput on size 200000;
    rem
    rem $OFSA is a UNIX alias so sql plus is talking to UNIX
    rem
    spool $OFSA/logs/OFSAP/common_coa_id.log;
    prompt 'Enter date in mmddyyyy format, without quotes';
    exec upd_common_coa_id_driver ('&date_mmddyyyy');
    spool off;
    As an example, I'd like to have a file with this name: common_coa_id083002.log
    Thanks.

    In SQL*Plus this is what you can do to get the current date/time as part of the spool file:
    ============================================================================================
    SQL> column tm new_value file_time noprint
    SQL> select to_char(sysdate, 'YYYYMMDD') tm from dual ;
    1 row selected.
    SQL> prompt &file_time
    20020816
    SQL> spool C:\Temp\logfile_id&file_time..log
    . /* put your code here */
    . /* it will go to a file called C:\Temp\logfile_id20020816.log */
    SQL> spool off
    SQL>

  • How to create two prompts with same named object?

    Hi to All,
    I am a new user of OBIEE. Actually have only one column called creation date in my report. My requirement is in dashboard, I need to display two text boxes in same prompt with the name Beginning creation date and Ending Creation Date. Actually, I was able to do it with the operator "Between" but when i am doing it, I was not able to determine how can we get the values entered by the user for beginning date and ending date because both dates will get stored in the same prompt only (ie) in my "Creation date" prompt.
    Also, I have an another question, In a single prompt I need to repeat the same object more than once. But When I tried it shows the error "same column exists.. so this action will be ignored". Please help.
    Thanks in Advance,
    Thenmozhi

    Thenmozhi,
    You can think about having 2 different prompts: the first one with the operator >= and the second <=.
    For your second question you cannot have the same column in the same prompt more then once
    Regards
    Adil
    PS:Please assign points and close the thread when your question is answered

  • Please help me out with  "Data only excel option "

    Post Author: pavan pusuluri
    CA Forum: Crystal Reports
    When i am trying to spool the data with data only excel option using crystal reports XI, the records are appearing in two rows instead of single row. i have studied that when we use data only excel option entire record will be displayed in a single row,but it is not appearing in that way.Please help me out in fixing this bug. I am very much new to crytal reports.

    Post Author: pavan pusuluri
    CA Forum: Crystal Reports
    I thank you for the prompt reply.  
    All the field are of same size and height.  The format is fine.  The report is designed in such a way that data is   displayed in three detail sections. What i would like to have is " i want the data in these three sections to be displayed in a single row when i select the data only excel  export option".Please help me  out in fixing this issue.
    Thanks in anticipation

  • Issue with Date Format

    Hi All,
    I m facing an issue with Date format in the prompt. I have used date presentation variables in my column formula as shown below:
    FILTER("SKU Order Details"."Fulfilled Quantity" USING Time."Calendar Date" <= DATE '@{todate}{2900-01-01}')
    The report returns data when I don't select any date range for start & end date prompts on the page. But when I select the start & end date values in the prompt, I m getting the following error:
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 46047] Datetime value 10/22/2009 12:00:00 AM from 10/22/2009 12:00:00 AM does not match the specified format. (HY000)
    I included the following formulas for start & end date prompts:
    Start Date prompt: case when 1=2 then License."Ips Creation Date" else cast ('1.1.1900' as date) end
    End Date prompt: case when 1=2 then License."Ips Creation Date" else cast ('1.1.2900' as date) end
    Can you please help me resolve the issue.
    Thanks,
    Kartik

    Hi Nico,
    I tried putting the format that you mentioned, I m getting an error message.
    My prompts have the following formula :
    Start: case when 1=2 then License."Creation Date" else cast('1.1.1900' as DATE) end
    End: case when 1=2 then Time."Calendar Date" else cast('1.1.2900' as DATE) end
    My column formula has the following syntax:
    FILTER("SKU Order Details"."Fulfilled Quantity" USING Time."Calendar Date" between DATE '@{start}{1900-01-01}' AND DATE '@{end}{2999-01-01}')
    Error Message:
    Error Codes: OPR4ONWY:U9IM8TAC:OI2DL65P:OI2DL65P
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 46047] Datetime value 11/17/2009 from 11/17/2009 does not match the specified format. (HY000)
    Can you please let me know if something needs to be changed.
    Thanks,
    Kartik

Maybe you are looking for

  • Issue with tabs frequently reloading on my iPad Mini Retina

    After opening 4 tabs (sometimes just 2 or 3) on my iPad Mini Retina, returning to the first opened tab has me needing to reload it on Safari. Same case when I exit to another app like Gmail or the Appstore and then return to the browser. Why is that

  • I can't get the internet to work on my E5

    Hi I bought an E5 today and I can't seem to get the internet to work on it. I have dowloaded the WAP and internet settings from that configurator thing but it just does not work. Can someone please help me!!

  • HT5096 where is the administrator window when I drag the folder "Backups.backupdb" from the old hard drive on the new one?

    where is the administrator window when I drag the folder "Backups.backupdb" from the old hard drive on the new one? At the moment when I try to do it, the window that appear doesn't allow me to continue. it only says "the volume has the wrong case se

  • Flash Builder 4.5 automatically building project issue.

    Hi, there!      When using FB 4.5 trial, I met this: If I uncheck project->Build Automatically, so that projects are not builded when saving changes, and compiling errors like "super can not be called after return, throw, super", or "lack of override

  • Screen Resolution Problem

    I have an idea pad U310 and every once in a while, I will turn my computer on and the screen will be shifted and stretched. I have tried restarting my computer again to fix it, sometimes it works, but sometimes it doesn't. I have also tried going int