Oracle Analytics Cloud and Server

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

Reg. using Repository/Presentation Variables in Analyses

Received Response
21
Views
2
Comments
Prasanna M
Prasanna M Rank 4 - Community Specialist

Dear friends,

Can we refer a Repository Variable/Presentation Variable in an analysis. If so, what is the syntax for that. I tried the below approach but failed.

Since I have outer joined a Fact table to Dim table, I want to retain Logical Dimension Field Value in the report by showing NULL for Book Date on applying date filters on the column (Book Date).

So, I would like to do IFNULL(Book Date, 'Param Date') which is failing. I have tried using both Presentation/Repository Variable and failed.

PV_Error.JPG

Regards

Prasanna

Answers

  • Pedro F
    Pedro F Rank 6 - Analytics Lead

    Hi,

    Yes, you definitely can. The problem you're currently having is that you are putting in the ifnull expression a presentation variable that isn't a date. Your formula should be: IFNULL(Book Date, date '@{BranchDate_DRV}'). That will solve your issue.

    One more thing that can also be useful regarding your question is what I have in the image below. When you're editing a formula, you can select the option "Variable" and then select one of the options available. That will bring up a box where you can put the variable name and OBIEE automatically sets up the variable syntax.

    variables.png

    Cheers,

    Pedro

  • Prasanna M
    Prasanna M Rank 4 - Community Specialist

    Thanks Pedro for the response.