Using Calendar Picker (Dashboard Prompt) variable in report filter

Hi All,
I have checked the forum and it doesn't look like this was answered. I have a presentation variable "CalendarDate" for a dashboard prompt that uses the calendar picker. Has anyone found an easy way to use the presentation variable in a report filter?
I want to grab the presentation variable then use this as the criterion for the report filter.
I have tried the below for the report filter but I receive an error. Do I have to cast this value to a Date?
Date.Date <= @{CalendarDate}
Or, do I have to get the variable value and convert it to the date 'YYYY-MM-DD' format to use?
Any thoughts would be appreciated.
Thanks!
John

So here is what I came up with. Probably not the most efficient nor elegant but it works. I am now able to use the calendar picker variable as a date to perform date calculations.
Basically there are three scenarios for the variable value: D/M/YYYY, (DD/M/YYYY or D/MM/YYYY), DD/MM/YYYY. I use char_length function to find the length. When char length is equal to 9 there are two scenarios. If none of the scenarios work, pass the CURRENT_DATE.
code below --------
CASE CHAR_LENGTH('@{CalendarDate}')
WHEN 8 THEN CAST('date' || ' ' || char(39) || SUBSTRING('@{CalendarDate}' FROM 5 FOR 8) || '-' || CONCAT('0', SUBSTRING('@{CalendarDate}' FROM 1 FOR 1)) || '-' || CONCAT('0', SUBSTRING('@{CalendarDate}' FROM 3 FOR 1)) || char(39) AS DATE)
WHEN 9 THEN
     CASE WHEN SUBSTRING('@{CalendarDate}' FROM 2 FOR 1) = '/' THEN
     CAST('date' || ' ' || char(39) || SUBSTRING('@{CalendarDate}' FROM 6 FOR 9) || '-' || CONCAT('0', SUBSTRING('@{CalendarDate}' FROM 1 FOR 1)) || '-' || SUBSTRING('@{CalendarDate}' FROM 3 FOR 2) || char(39) AS DATE)
     ELSE
     CAST('date' || ' ' || char(39) || SUBSTRING('@{CalendarDate}' FROM 6 FOR 9) || '-' || SUBSTRING('@{CalendarDate}' FROM 1 FOR 2) || '-' || CONCAT('0', SUBSTRING('@{CalendarDate}' FROM 4 FOR 1)) || char(39) AS DATE)
     END
WHEN 10 THEN
CAST('date' || ' ' || char(39) || SUBSTRING('@{CalendarDate}' FROM 7 FOR 10) || '-' || SUBSTRING('@{CalendarDate}' FROM 1 FOR 2) || '-' || SUBSTRING('@{CalendarDate}' FROM 4 FOR 2) || char(39) AS DATE)
ELSE CURRENT_DATE
END

Similar Messages

  • Or between prompted columns in report filter

    Hi,
    If I give an 'Or' between two prompts in the report filter, as below:-
    Value Date is prompted
    OR Trade Date is prompted
    ... then the condition does not apply on the report.
    I am using dashboard prompts
    OBI version is 10.1.3.4.1
    Is there a way around this?
    thanks,
    Gaurav

    Hi,
    If I hard code in the report filter and use or between the conditions then it works fine.
    The prompted filters are not working with 'Or' in between.
    It looks like a bug. Can something be done about it?
    Using a presenation variable should work, but it will have some other limitations.
    thanks,
    Gaurav

  • Passing Parameters for Dashboard Prompts to Answers Report

    I have the following requirement.
    I want to pass the value of a 2 dashboard prompts to an answers report. What is the syntax using GO URL method.
    Thoughts anyone?

    Refer to this link on how to achieve this: http://www.iwarelogic.com/2010/09/integrating-oracle-obiee-content-using-go-url-850/
    Regards,
    -Amith.

  • Dashboard Prompt - Variable - Populate/Calculate column in Pivot Table

    1. I have a need to store the values of three prompts (Year, Quarter and Month) in my dashboard prompt, So a 'column A' (calculated value/measure) can be dynamically populated in my pivot table based on the users chioce.
    These prompts have to be multiselect prompts as the user may opt for 2 or more years/ quarters / months etc.
    I don't think Presentation Variable would work as I have to use multiselect prompt, I have been trying Non-System Session Variables & dynamic repository variables- but could not get it to work. I am thinking only of using one of the three variables (session/dynamic/presentation) so far, is there a better way to tackle this?
    Any help/pointers would be much appreciated, thanks

    I should clarify a little: our sales "process" is very simple (not really a process). We do not use Opportunities. We enter new Leads, and if we win the business, we convert them to a Contact. Thus, our "win %" is simply the number of converted Leads divided by the total Leads for a given period. In my table I would like to display the % of Leads for a given period that are converted to Contacts.
    Thanks again.

  • Using calendar object on prompt

    I'm having prompt with two calendar objects - FROM and TO dates selection for setting report's time frame.
    How can I show error message when user enter invalid date (typing directly in text box) or in case user select dates where FROM is after TO dates?

    @ nir
    Are you using 10g,if so i worked with the same solution couple of months back and it worked for me nor it caused performance issues.Its not JS script but just adding a IF statement to the existing sections if you have see the link.....Coming to 11g that im working still dint go to that extent to look back,i suppose it has been solved.
    UPDATED POST
    Coming to 11g there are many bugs.....i would suggest you to wait till march-april so next 11g R2 release is due to come at that period according to road map.
    We cant predict anything saying this will be solved....same happened when 11gR1 many expectations where there but ended up with bugs and many unsolved issues iam facing.
    We can do 1 thing hoping for best :)
    Is it helpful?
    By,
    KK
    Edited by: Kranthi on Jan 13, 2011 1:36 AM

  • Using row-wise multi-value GROUP system session variable in report filter

    The title says it all except I am using 10g OBIEE.
    What I want to do is filter on the dynamic system session variable GROUP created in a row-wise initialization block.
    The GROUP vriable is being set up correctly and it shows the user dynamically put into the correct groups in Answers.
    (Using the admin tool and looking at the user session, only the initial authentication block variables show up.)
    But if I want to filter using the value of GROUP it doesn't work.
    The obvious way is to choose the filter icon, then choose Add -> Variable -> Session, enter GROUP, and then display results.
    It comes back with no rows.
    Any idea how to do this? I've tried lots of things but none of them work either producing no rows or an error.
    This is the kind of Answers SQL this report is resulting in, which makes sense to me, but produces no rows.
    SELECT "Package Virtual Group (Dim)"."Package Virtual Group" saw_0, "Contact (Fact)"."Contacts All Count" saw_1 FROM "Case/Transaction/ABC" WHERE "Package Virtual Group (Dim)"."Package Virtual Group" = VALUEOF(NQ_SESSION."GROUP") ORDER BY saw_0

    866038 wrote:
    Errors come from trying things that don't work.
    For example, instead of =, using IN VALUEOF(NQ_SESSION.GROUP) or @{session.GROUP} or lots of other things.
    The question is this:
    how can I filter a column in Answers using the GROUP session variable which had been initialized in a row-wise initialization block?
    I can find no way to do it. Mostly it returns no rows.Hi,
    we had a similar requirement, where we have an external name that has project number values. We used row wise initialization to capture all the projects that a user belongs to. Then, we applied the filters at the RPD level, instead of doing it at the report level. From you requirement I see that you are trying to filter the groups based on user login. When a user logs in, he will see the information about the groups that he only belongs to. Correct me if I am wrong here.
    Assuming I am right about your requirement, providing the filter that you need apply in RPD.
    On all the fact tables are joined to the Package Virtual Group dimension, apply the below filter.
    case when 1=1 then (Dim)"."Package Virtual Group" END = VALUEOF(NQ_SESSION."GROUP");
    The reason for use of case statement here is, it converts the logical sql to IN Clause, helping us acheive the exact query that we would want.
    Please Award points if this helps.
    Thanks,
    -Amith.

  • Request variable not overriding session variable in report filter

    I have a dashboard edit prompt that saves value into a request variable with same name as session variable.
    The session variable has "enable any user to set the value".
    I have a filter in the report that has been converted to sql where the transaction date is greater than the value entered in the prompt.
    I see the "SET Variable" clause at the top of the sql being sent to the server in the logs.
    However, when I am in "View Logs", I see that the sql that is being sent to the database is sending the original value of the session variable instead of the new value in the request variable.
    I have tried using VALUEOF(NQ_SESSION.variablename), VALUEOF(variablename), VALUEOF("Dynamic Initialization Block Name"."variablename"), @{biServer.variables['NQ_SESSION.variablename']} with no difference.
    What am I doing wrong?

    user4006070 wrote:
    I have a dashboard edit prompt that saves value into a request variable with same name as session variable.
    The session variable has "enable any user to set the value".
    I have a filter in the report that has been converted to sql where the transaction date is greater than the value entered in the prompt.
    I see the "SET Variable" clause at the top of the sql being sent to the server in the logs.
    However, when I am in "View Logs", I see that the sql that is being sent to the database is sending the original value of the session variable instead of the new value in the request variable.
    I have tried using VALUEOF(NQ_SESSION.variablename), VALUEOF(variablename), VALUEOF("Dynamic Initialization Block Name"."variablename"), @{biServer.variables['NQ_SESSION.variablename']} with no difference.
    What am I doing wrong?When you created the prompt, did you make sure you set the variable type to Request variable?

  • Unnecessary Report refresh on the dashboard when changing the dashboard prompts

    Hello All
    I have two reports on a dashboard with two dashboard prompts for example Report 1) Year, State, Count; Filter: Year is prompted 2) Year, State, Count; FIlter: State is prompted. On the dashboard we have two reports Report1) and Report 2) with Year and State dashboard prompts.
    The issue is when you change year prompt both the reports gets refreshed even though nothing changes on report 2 but it still dissapears and appears as it is refreshing and  the same happens with report 1 when i change the state prompt it refreshes that report.
    Please letme know how i can limit the dashboard prompt to refresh only the report where it is prompted.
    Thanks
    Ravi

    are you talking about the database table caching? if so we are using OLAP cubes and I am not sure if caching is disabled. Is my issue related to caching? also another updated if I have just one dashboard prompt for example just year  only report 1 refreshes and the report 2 doesn't disappear. But when I add state dashboard prompt, which ever prompt I change state or year  both reports refreshes. The problem is when I add more than one prompt on the dashboard all the reports refreshes when the dashboard prompt selection changes. Any ideas.
    Thanks

  • 'is between' used in Dashboard Prompt

    I have two columns used in the Dashboard prompt:
    1. Department Description: Based on Department ID (In the BMM Layer, the descriptor column is Department ID)
    2. Employee Name: Based on Employee ID (In the BMM Layer, the descriptor column is Employee ID)
    Example of the data stored in the DB:
    Department Description: Sales
    Department ID: 01
    Employee ID: 1001
    Employee Name: 1001 - ABC
    Dashboard Prompt Scenario 1:
    Simply select two columns mentioned above, the prompt works fine.
    Dashboard Prompt Scenario 2:
    - Select two columns in the prompt (Employee Name and Departmemt Description)
    - Default the Department Description to 'Sales'
    - For the column Employee Name, use the operator 'is between' and default the values '1001 - ABC' to '3001 - XYZ', then the column Department Description shows the value for Department ID (01). The expected result is that the column Department Description should show the value 'Sales'
    - If the operator for Employee Name is changes to 'is equal to', the expected output is achieved.
    - Its only with the operator 'is between' when the expected output is not achieved.
    Has anyone encountered similar issue earlier?

    I have two columns used in the Dashboard prompt:
    1. Department Description: Based on Department ID (In the BMM Layer, the descriptor column is Department ID)
    2. Employee Name: Based on Employee ID (In the BMM Layer, the descriptor column is Employee ID)
    Example of the data stored in the DB:
    Department Description: Sales
    Department ID: 01
    Employee ID: 1001
    Employee Name: 1001 - ABC
    Dashboard Prompt Scenario 1:
    Simply select two columns mentioned above, the prompt works fine.
    Dashboard Prompt Scenario 2:
    - Select two columns in the prompt (Employee Name and Departmemt Description)
    - Default the Department Description to 'Sales'
    - For the column Employee Name, use the operator 'is between' and default the values '1001 - ABC' to '3001 - XYZ', then the column Department Description shows the value for Department ID (01). The expected result is that the column Department Description should show the value 'Sales'
    - If the operator for Employee Name is changes to 'is equal to', the expected output is achieved.
    - Its only with the operator 'is between' when the expected output is not achieved.
    Has anyone encountered similar issue earlier?

  • Dashboard Prompt to filter multiple Subject Areas (in a Combined Analysis)

    I have a Combined Analysis where I am combining multiple Subject Areas. I want to add this report to a dashboard to use a dashboard prompt to filter by the Year.
    The problem I have is because the 'Year' value in each subject area has a different Column Formula ("Close Date"."Calendar Year" and "- Custom Number/Integer (Custom Object 2)".INDEXED_NUM_0)) I'm unable to have a single 'Year' prompt filter both Column Formulas.
    I have it currently working by creating two dashboard prompts - one for each subject area - that each ask for the Year to filter by.
    Is there a way to have a single prompt for Year and somehow have that filter both subject area's 'Year' value?

    I have tried a bit with no luck.
    In the Dashboard Prompt on that 'Year' filter I set the Presentation Variable to 'FILTER_YEAR'.
    I then set the filter in the report to be Equal to a Presentation Variable with the Variable Expr set to 'FILTER_YEAR'.
    When I run the report and enter the filter year it doesn't bring back any data for that report.
    Anybody have experience using the Presentation Variables?
    Thanks

  • Urgent- How to Default Current Months First Date in a Dashboard Prompt

    We have requirement that whenever our user clicks on a dashboard it should show the report associated with the dashboard defaulted to MTD.
    For example if the user is running the dashboard on 16th Jan then the report associated with dashboard by default should show data from 1st Jan to 16 Jan.
    And then latter user should be able to select the dates of his choice in dashboard prompt and the report should show data according to selected date.
    Please send some clues or work around for this issue.

    Regarding Question 2:
    What you need to have is a Dashboard scope dashboard prompt for Product_ID (i.e., Don't use the column prompt from the prompt tab within the Request.)
    1) Create the dashboard prompt, put it on tab1 and save the prompt to a presentation variable, say prmtProdID. Set the scope to "dashboard." (This is the default, by the way.) If you create a dashboard prompt and set the scope to "dashboard," then the prompt values selected will hold true across dashboard pages.
    2) On tab2, go to your report and in Criteria mode, apply a filter to the Product_ID column making it equal to the PV. (Click the filter icon, Add>Variable>Presentation Variable and type prmtProdID. Save.)
    When the user selects a Product_ID on tab1 of your dashboard and hits "Go," not only will it filter your report on tab1, when you go to tab2 the report here will be filtered with the same value selected in the prompt on tab2.
    Regarding Question 3:
    If you implement 2, you cannot implement 3. You can't have it both ways. Not for the same scenario. But if you want to know how to do it in general, read this:
    http://obieeone.com/2009/08/24/how-to-stop-queries-to-automatically-fire-off-once-entering-dashboarddashboard-page/

  • Display In Between  Prompts Value in Report Title

    Hi All,
    I want to show the in between dashboard prompt value in Report.
    So that when user download the report he will come to know the date range.
    I have gone through the couple of links but it does not work.
    I tries the below one but when ever i am selected the to_date it reset the from date also.
    http://obiee101.blogspot.com/2009/03/obiee-between-dates-prompt.html
    Thanks
    Nawneet

    I would add one thing to Saichand's solution which I use for the situation you describe. If you create two dashboard prompts one for the "from" date and the other for the "to" date and then modify your filter on the date column to be:
    datecolumn >= @{From_Date} AND datecolumn <= @{To_Date}
    ...then you just need to add two more columns to your report to house the presentation variables. Make these columns the first two so that in your Narrative View you can reference them as "Between @1 and @2"
    You don't need another report to place on top of your current one, just add the Narrative View to your existing report.

  • How to pass dashboard prompt value to requests in folder

    Hi,
    I want to have a dashboard page that contains dashboard prompt for period and list with requests (for this I add Folder and select "Expand folder").
    If I use dashboard prompt to set presentation variables, the chosen value is not passed to requests in folder list and as I understand this is the way presentation variables work. Therefore I tried to use Request variable, but get the same result - value that is chosen in dashboard prompt, influences request only if it is shown in dashboard not if I open it from folder list.
    Steps I did:
    (1) Created session variable "Period", that users can alter. Initialization block is simple dummy select - Select ’2008.08’ from dual;
    (2) Created dashboard prompt that sets Request variable Periods;
    (3) Created report with session variable value in it:
    SELECT Time."Period code" saw_0, VALUEOF(NQ_SESSION.Period) saw_1 FROM "TEST" WHERE Time."Period code" = VALUEOF(NQ_SESSION."Period") ORDER BY saw_0, saw_1
    If I include this report directly in dashboard, it shows the session value that is set from dashboard prompt, however when I open it from folder list, it shows the default value 2008.08 although I have stayed in the same session.

    Iza, you are correct in your assumption regarding passing Presentation Variables to reports that are in the Folders object. If you have a dashboard prompt on the same page as the Folders object, then even if you select a value in the prompt, it will not pass when you click on the report name in you Folders object.
    Here is something you might want to consider to achieve what I think you are trying to do. Instead of having the Dashboard prompt on the first page, create a "table of contents" home dashboard page. What I mean is:
    1) First, create a Dashboard page with the prompts you wish to filter a report with and set the default values. Save this as the template dashboard page. Now, with a second copy of this template, drag one of your reports to this page. Save it. Using your dashboard template page, create another copy and drag the second report to this page. Save. Do this for each report you wish to display. Note that you can drag more than one report to a dashboard page.
    When you are done, you will have several dashboard pages, each with one or more reports and the dashboard prompts on the top of the page.
    2) Now on your "home page," drag the Link or Image to a section. Link this object to the first dashboard page you created in step one. Name the link the title of your report. If there are more than one report on this page, title the link appropriately. Click the "open in new window" checkbox. Drag a Link or Image object for each dashboard page you created in step one.
    When you are done, this home page will look similar to your Folders object, with links to each of your dashboard pages that contain the reports. When the user clicks on the link, the appropriate dashboard page will appear with the dashboard prompts and the report will be filtered on the default values. Now the user can change the values of the prompts as desired. When the user is done, he/she can close the window and he/she will be taken back to the home page to select another report.

  • Passing Values to Dashboard Prompt

    Hi Gurus,
    I have a summary Dashboard page with summary report and prompt build on Summary table , and i have a detail dashboard page contains Detail report and prompt same as Summary but these prompts are from Dimension tables and report from fact and Dimension.
    The requirement is Once i click some value in Summary dashboard it has to pass the values to Detail dashboard ( Means Passing the values to Dashboard prompt) and show the result in detail.
    As i cant use the OBIEE navigation logic to pass the values as prompts columns are not from same table. So i thought to use the GO URL this also i cant use as i am using Pivot table in Summary report. I thought to use Summary prompt in the detail Dashboard and create a dummy reports based on the prompt and resultant value pass to the Detail reports. I am able get the values but i am not getting proper answer. I dont no why .
    Is i am doing correct ? i know its not elegant way. If some one give me tip or direction that will be great help.
    Thanks in advance.
    Regards
    Ali

    If you are attempting to pass a value from one table1.column1 to another table2.column2 where the two do not match then you will need to use a presentation variable to hold the value. You can populate the variable using a hidden dashboard prompt that has the table1.table2 and read the value into a variable. You can then use this variable to filter the table2.column2

  • Unresolved column when using presentation variable in Answers filter

    Hi all,
    I'm using a dashboard prompt that sets a presentation variable - pres_year. I'm using the presentation variable in a request's filter.
    In the 'Criteria' tab, in the filter for the request, I set a year column (YEAR) to the presentation variable via Variable Expr and enter the presentation variable name only. End up with:
    YEAR is equal to / is in @{pres_year}
    When using the dashboard, the prompt and request all work fine. The problem is when I'm in the request in Answers and I click on 'Display Results' button. I get the following error:
    'NQSError: 27005 unresolved column pres_year'
    Any suggestions?
    Thanks.

    I got same error, if i'm using SQL Expression, instead of variable expression in filter section.
    make sure that you followed this:
    filter on year > Add > Variable > Presentation. Then, give the presentation variable name (which you defined in dashboard prompt) in Variable Expr field , click OK
    getting same error when using:
    Filter on year column > Add > SQL Expression > presentation variable. This is not right place to give presentation variable.
    and, error i got:
    *State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27005]* Unresolved column: "var_Year". (HY000)
    so, make sure that you are suing the right one..

Maybe you are looking for

  • Purchased music on iPhone 5, shows as purchased but not on phone (iTunes Match)

    This has happened not just for a few songs but for a couple of albums and about 5 songs. I buy some music on my iPhone 5 on iTunes, and here recently only a handful of my purchased music will not show up on my phone. They show in the iTunes store as

  • Anchored Frame with auto shrink wrap

    Hi I have an issue that I need help with. I'm importing a range of graphics into my document and in my read/write rules I have all of the required properties to the images.  When the images are imported they are correctly displaying (size etc) but th

  • Business Intelligence Applications 7.9.6

    Hello World!! We are planning to implement BI Apps 7.9.6. I see in the installation document that Informatica PowerCenter is needed for ETL Jobs? Do we need to license Informatica for this? Can anyone tell me if Informatica is the only way? I know we

  • Event listeners

    It seems like I have this problem a lot. I can never figure out how to solve this. I'm writing an application, and I can't just implement actionlistener and then do addActionListener(this) to the button becuase of all the static variables and crap. S

  • Where can I download the File 102_EWT_config_EN_IN.xls

    Hi, In the documentation DVD it has been asked to refer the file 102_EWT_config_EN_IN.xls. But I'm not able to find that file. Can it be downloaded from somewhere? Thanks in advance... Regards, Sriram