Oracle Analytics Cloud and Server

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

Last week details in OBIEE 11g

Received Response
201
Views
7
Comments
961614
961614 Rank 4 - Community Specialist

Hi All,

I am trying to create last week details report. I am able to get the required details by using below condition, but I have created presentation variable called "pd" and how to pass that variable.

"Times"."DATEMAKE"  >=TIMESTAMPADD(SQL_TSI_WEEK,-1,CURRENT_DATE)

Kindly help how to call variable in above condition.

If user select any date, it should fetch last week complete data.

Thanks,

Ramesh

Answers

  • FTisiot
    FTisiot Rank 6 - Analytics Lead

    If I understand you correctly you want to show the data of the week before the selected date? what about?

    "Times"."DATEMAKE"  >=TIMESTAMPADD(SQL_TSI_WEEK,-1,cast('@{pv}{17/07/2017' as date))

  • 961614
    961614 Rank 4 - Community Specialist

    Hi,

    My requirement is, If I select any date in the calendar, it should fetch 7(one Week) days back data from selected date.

    For example If I select 8-JUL-2017, the report should show from 1st July To 8th July.

    The below condition providing 7 days back data and up to current data.

    "Times"."DATEMAKE"  >=TIMESTAMPADD(SQL_TSI_WEEK,-1,@{pd}{CURRENT_DATE})

    result showing before 13th July and after 13th July data also.

    pastedImage_0.png

    Without Dashboard prompt it is giving correct output.

    pastedImage_2.png

    pastedImage_1.png

    Thanks,

    Ramesh

  • FTisiot
    FTisiot Rank 6 - Analytics Lead

    The problem is that you are missing part of the filter

    "Times"."DATEMAKE"  >=TIMESTAMPADD(SQL_TSI_WEEK,-1,cast('@{pv}{17/07/2017' as date))

    will filter from 7 days before the selected date

    you need to also add another where condition like

    "Times"."DATEMAKE"  <cast('@{pv}{17/07/2017' as date)

  • 961614
    961614 Rank 4 - Community Specialist

    Thanks for your help.

    Almost it reached, but it is showing only 6 days data.

    pastedImage_0.png

    pastedImage_1.png

    Thanks,

    Ramesh

  • FTisiot
    FTisiot Rank 6 - Analytics Lead

    What date did you choose?

    If you choose 13-07-2017 it should show dates between 06-07-2017 and 12-07-2017 with the filter

    "Times"."DATEMAKE"  >=TIMESTAMPADD(SQL_TSI_WEEK,-1,cast('@{pv}{17/07/2017' as date)) and "Times"."DATEMAKE"  <cast('@{pv}{17/07/2017' as date)

    BTW marking the replies as helpful or correct will help others with the same problem

  • 961614
    961614 Rank 4 - Community Specialist

    thanks for your support

  • FTisiot
    FTisiot Rank 6 - Analytics Lead

    Glad it solved! You should now mark the thread as answered since as of now still appears as Not Answered.