Oracle Analytics Cloud and Server

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

Obiee 11g date range report

Received Response
21
Views
5
Comments
961614
961614 Rank 4 - Community Specialist

Hi All,

I have two prompts one is from_date and second is to_Date. My requirement is report should fetch only 4 days data.

If users entered more than 4 days , report should be no results. In case date range is <= 4 days, report should generate data. I have achieved this in query level. but how to call these two prompts in dashboard level and report level.

I have created two column prompts by using subject area and added report and prompts in dashboard. Now to build relation between prompt and report?

to_DATE(TO_CHAR(Time.Date,'DD/MM/YYYY'),'DD/MM/YYYY')>=to_date('@{Enter_date_from}{01/01/1800}','DD/MM/YYYY') AND to_DATE(TO_CHAR(Time.Date,'DD/MM/YYYY'),'DD/MM/YYYY')<=to_date('@{Enter_date_to}{01/01/1800}','DD/MM/YYYY')

and abs(cast('@{Enter_date_to}{01-JAN-1800}' as date) - cast('@{Enter_date_from}{01-JAN-1800}' as date)) <= 4

Thanks in advance,

ramesh

Answers

  • [Deleted User]
    [Deleted User] Rank 2 - Community Beginner

    a) Why all those conversions?!

    b) Why not just a check on a timestampdiff between the two dates?

  • 961614
    961614 Rank 4 - Community Specialist

    thanks it was resolve

  • [Deleted User]
    [Deleted User] Rank 2 - Community Beginner

    @961614  This is a participative forum so the least courtesy you could show other users is to state how things were resolved.

  • 961614
    961614 Rank 4 - Community Specialist

    Hi,

    I have applied  below filter condition

    Filter Condition 1

    "TIme.Date" BETWEEN TO_DATETIME('@{From_Date}{2017-09-10 00:00:00}','YYYY-MM-DD HH24:MI:SS') AND TO_DATETIME('@{To_Date}{2017-09-20 00:00:00}','YYYY-MM-DD HH24:MI:SS')

    Filter Condition 2

    AND abs(TO_DATETIME('@{To_Date}{2017-09-20 00:00:00}','YYYY-MM-DD HH24:MI:SS')- TO_DATETIME('@{From_Date}{2017-09-10 00:00:00}','YYYY-MM-DD HH24:MI:SS'))<=4

  • asim cholas
    asim cholas Rank 6 - Analytics Lead

    Date '@{PV}{2017-04-30}' will do