Oracle Analytics Cloud and Server

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

Date session variable not showing correctly in report narrative text when opening the dashboard init

Received Response
41
Views
3
Comments
User_2L7MU
User_2L7MU Rank 1 - Community Starter

Hi,

I am trying to use a narrative text to display the current filters that the user is applying on a dashboard.

For this I am using a narrative text box and calling the session variables that hold the prompt filter values.

I am facing some issues with the display of the date prompt filters when the dashboard is opened initially

When I use the following expression in the narrative text:

[br/][b]Start Date:[/b] @{startDate} &nbsp&nbsp&nbsp[b]End Date:[/b] @{endDate}

The filters are showing as below:

Start Date: 2019/01/01 00:00:00    End Date: 2019/08/04 00:00:00

While when the using the following expression:

[br/][b]Start Date:[/b] @{startDate}[YYYY-MM-DD] &nbsp&nbsp&nbsp[b]End Date:[/b] @{endDate}[YYYY-MM-DD]

The filters are showing as below

Start Date: YYYY-MM-DD    End Date: YYYY-MM-DD

Can you please advise on how should the session variables be called in order for the dates to be displayed correctly when the dashboard is opened?

Thank you.

Answers

  • Jerry Casey
    Jerry Casey Rank 6 - Analytics Lead

    If you have default values for these presentation variables, enclose them in the same curly brackets as the variable name, like this:

    @{startDate}{2019/08/04}.  That will set the format.  Alternatively, include them in a properly formatted column, and reference the column in your narrative view, using the @x syntax, where x is the column number, starting with @1 from the left.

  • User_2L7MU
    User_2L7MU Rank 1 - Community Starter

    The startDate has a default value set from a repository variable, the first day of the year and called in the prompt as NQ_SESSION.1ST_DAY_YEAR

    But when displayed in the narative text, BI is showing also the timestamp part like: Start Date: 2019/01/01 00:00:00.

    I have tried various options but not been able to show only the date part when the dashboard is opened initially. I tried also suggestions from @Jerry Casey, but not working.

    Regards.

  • Jerry Casey
    Jerry Casey Rank 6 - Analytics Lead

    In the example below, I formatted the timestamp value as YYYY-MM-DD in the column properties.

    the narrative view is simply @2____________@3______________@4

    pastedImage_1.png

    This is what I meant - the narrative will display the data from a column as it is formatted in that column.

    Format of column 4:

    pastedImage_0.png