Oracle Analytics Cloud and Server

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

How to use request variable in rpd

Received Response
102
Views
4
Comments
3238275
3238275 Rank 2 - Community Beginner

Hi,

I have a requirement:

In my RPD, I have a metric Act amount. that should be calculated based on 2 metrices in rpd (Loc Amount( local currency amount) and other is Doc amount (Document currency amount).

I have a dashboard prompt for currency, if user chooses Doc currency in prompt, then Act amount should use Doc Amount column ,  if user chooses Loc currency in prompt, then Act amount should use Loc Amount column.

How to pass user selected currency from prompt to RPD to achieve this?

How/can we use request variable?

Thanks,

Anilesh

Answers

  • Joel
    Joel Rank 8 - Analytics Strategist

    You probably can achieve this with a presentation variable. In your dashboard prompt, populate a presentation variable that takes a value dependent on what currency type has been selected by the user.

    in the metric act amount column formula, you can reference the presentation variable. If you have OBIEE 12c, you can save the column formula which will then be available to re use in other reports via the catalog.

  • 3238275
    3238275 Rank 2 - Community Beginner

    H Joel,

    I am building the formula in RPD. Is it possible to access presentation variable inside RPD. Or any other way to acceess?

    Thanks,
    Anilesh

  • Thomas Dodds
    Thomas Dodds Rank 8 - Analytics Strategist

    You could do it by setting a session variable, but not a repository variable ... this is how currency selection and exchange rate is done.

    Here's some example of how it has been done:

    INDEXCOL(

       CASE  VALUEOF(NQ_SESSION."PREFERRED_CURRENCY")

       WHEN 'USD' THEN 0

       WHEN 'EUR' THEN 1

       WHEN 'AUD' THEN 2 END,

       "01 - Sample App Data (ORCL)"."Catalog"."BISAMPLE"."F19 Rev. (Converted)"."Revenue_Usd",

       "01 - Sample App Data (ORCL)"."Catalog"."BISAMPLE"."F19 Rev. (Converted)"."Revenue_Eur",

       "01 - Sample App Data (ORCL)"."Catalog"."BISAMPLE"."F19 Rev. (Converted)"."Revenue_Aud"

    )

    OBIEE - IndexCol Function - Handle hierarchy Level security [Gerardnico]

  • Joel
    Joel Rank 8 - Analytics Strategist

    Hi Anilesh

    You'll need to use a request variable if you need to access it in your repository.

    Also, you'll need to create a session variable in your repository with the same name as your request variable. The dashboard prompt sets the value for your request variable and in turn it overwrites the value of the session variable with the same name in the repository.

    You can then reference your session variable in your logical column formula within your repository and it's value will be overwritten by your request variable value.

    See a bit of information about request variables here:

    Creating Analyses