Cognos Analytics

Cognos Analytics

Connect, learn, and share with thousands of IBM Cognos Analytics users! 

 View Only
  • 1.  Relative Dates - What is Expected Query Behavior

    Posted Tue June 16, 2020 04:49 PM
    Hi,

    I have used the Gregorian data modules to add relative date filters.  When I create a simple report using one of the filters (say one measure, one attribute, and current month filter) I can no longer see the generated SQL.  Is that the expected behavior?

    Another thing I notice is the report takes several minutes to run as opposed to a few seconds using a simple expression filter.  I wonder is all of the data being brought to the Cognos server before it applies the filter?

    I find plenty of info on how to use the samples, but not what is happening when using them.


    Thanks.

    ------------------------------
    Jeremy Aude
    Channell Commercial Corporation
    Rockwall TX
    ------------------------------

    #CognosAnalyticswithWatson


  • 2.  RE: Relative Dates - What is Expected Query Behavior

    Posted Wed June 17, 2020 05:08 AM
    Hi Jeremy

    I read your question and wanted to check what you were saying, I am working with relative time, in my case only for dashboard.

    I have created a report with a package with relative data and have checked that I see the generated sql.

    In the attached image you can see it.


    Best regards


    ------------------------------
    Luis Moreno
    ------------------------------



  • 3.  RE: Relative Dates - What is Expected Query Behavior

    Posted Wed June 17, 2020 05:14 AM
    Regarding:
    "Another thing I notice is the report takes several minutes to run as opposed to a few seconds using a simple expression filter. I wonder is all of the data being brought to the Cognos server before it applies the filter?"
    Have you broken the link to the relative time module?
    https://www.youtube.com/watch?v=4lDrF3jx98g

    ------------------------------
    Sandeep Dhirad
    Elkjøp Nordic
    ------------------------------



  • 4.  RE: Relative Dates - What is Expected Query Behavior
    Best Answer

    Posted Wed June 17, 2020 11:10 AM
    Hi all,

    I found my problem.  The date I was using to tie to the calendar is using a Cognos function so was requiring local processing.
    • cast ( _shift_timezone ( TRANSACTION_DATE, 'America/Los_Angeles', 'America/Chicago' ), date )
    Once I removed that function I was able to see the generated SQL and the report ran very quickly.

    I plan on either using a database function or first creating a data set and then using that data set in my data module.

    I appreciate all of the help!  Have a great day!

    ------------------------------
    Jeremy Aude
    Channell Commercial Corporation
    Rockwall TX
    ------------------------------