Oracle Analytics Cloud and Server

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

Change report dynamically by passing Presentation variable value to report

Received Response
91
Views
7
Comments
Deepa Mohan-Oracle
Deepa Mohan-Oracle Rank 3 - Community Apprentice

Hi ,

I have a requirement where I have a filter which is a presentation variable taking Year value. Assume data is available from 2001- 2010 . And there are 2 reports in this particular dashboard(placed side by side) , which should dynamically change based on the prompt value that is selected .

So , when I select the year '2005' ,  the report on the left should show me the data for the years (2001 till 2005) and the report on the right should show me data   from (2006-2010) . This is just an example scenario . So for any year that I select this is the condition .

The solution I was thinking is that we could select  'Specific Column values'  under options for that prompt . But how do I pass the selected value dynamically to the report so that I can do something like ( Y0 till prompt) in one and  (prompt -Yn) in the other report.

Any thoughts would be appreciated ,

Thanks,

Answers

  • Joel
    Joel Rank 8 - Analytics Strategist

    Hi @1092369

    So you'll need a presentation variable to hold your start year (@{StartYear}{2010}) and the 2nd to pick year selected by user from your dashboard prompt (@{DatePresentationVariable}{2015}). the 3rd will hold the end year (@{EndYear}{2017})

    In the first report which should display from start to user selected year use:

    year_column BETWEEN @{StartYear}{2010} AND @{DatePresentationVariable}{2015}

    for 2nd report, to display from user selected year to end year, use:

    year_column BETWEEN @{DatePresentationVariable}{2015} AND @{EndYear}{2017}

  • Deepa Mohan-Oracle
    Deepa Mohan-Oracle Rank 3 - Community Apprentice

    Thanks for the quick reply , Joel

    The other condition is that ,I am supposed to be having only one prompt at the dashboard level which is the YEAR .

    So according to your answer , there will be 3 prompts created right ?

  • Joel
    Joel Rank 8 - Analytics Strategist

    Just one dashboard prompt which populates the DatePresentationVariable variable in my example. The others can be session variables which store the values of the start and end year of your data set.. I just wanted to avoid hard coding the start and end year values

  • Deepa Mohan-Oracle
    Deepa Mohan-Oracle Rank 3 - Community Apprentice

    Thank you for the inputs !!

  • Joel
    Joel Rank 8 - Analytics Strategist

    Hi @1092369

    If this is answered, mark the correct answer to ensure that your thread closes and that others who may have this issue in the future can find this thread.

  • 2709444
    2709444 Rank 3 - Community Apprentice

    Can you tell me why do we need two session variables? It wouldn't be a good idea to create new variables in RPD based on the requirements in a report. How about creating a presentation variable pv_year which takes value from the user, report on left is filtered for year< pv_year and the report on right is filtered  on year>pv_year? (I could feel that this logic helps to meet the user's requirement). Looking forward for your response.

    Thanks and Regards,

    Lakshminarasiman S

  • Joel
    Joel Rank 8 - Analytics Strategist

    For the purpose of the rest of the Community, as this thread has been answered and closed, I'd suggest you open a new thread and you can reference this thread in the thread that you open. Happy to help if I can if you do this.