Cognos Analytics

Cognos Analytics

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


#Product
#Analytics
#CognosAnalytics
#Analyticstools
#TechXchange Partner
#TechXchange Session
#TechXchange Presenter
#AI
 View Only
  • 1.  Same Time Period Help?

    Posted 03/28/22 11:05 AM
    Hello,

    I was wondering if anyone would be able to help me. I have two criteria that I want to be updated to do the same thing, but for the SAME TIME PERIOD the previous year.

    One is a report that we have scheduled to tell us a count of something for the week previous (So we would need that but time period last year.:

    IF ([Business Layer Standard].[Claim_Favorites__c].[Date_of_Loss__c] >_add_days(current_date, -8))
    THEN ([Business Layer Standard].[Claim_Favorites__c].[Status_Count__c])
    Else (0)


    The Other is just a standard, give a me a count reference, but i need it to also put same time period last year. THis one I am unsure if we can do because it does not reference time in general.

    [Business Layer Standard].[Claim_Favorites__c].[Status_Count__c]

    Any thoughts?

    ------------------------------
    Ryan Barstow
    ------------------------------

    #CognosAnalyticswithWatson


  • 2.  RE: Same Time Period Help?

    Posted 03/28/22 05:18 PM
    For the same time period last year (note this won't take into account week days etc., so March 28th this year is a Monday - last year it was a Sunday), you would probably want something along the lines of:
    IF ([Business Layer Standard].[Claim_Favorites__c].[Date_of_Loss__c]
    between _add_years(_add_days(current_date, -8)),-1)
    and _add_years(_add_days(current_date,-1),-1)
    THEN ([Business Layer Standard].[Claim_Favorites__c].[Status_Count__c])
    Else (0)

    ------------------------------
    Chris Turner
    ------------------------------



  • 3.  RE: Same Time Period Help?

    Posted 03/29/22 11:22 AM
    So I am very novice to all of this.  I mean my original If statement seen above took me over two weeks to figure out through trial and error.  I did get yours too work with no errors, however that being said.  It returns a value of zero...Thoughts on why that might be?

    ------------------------------
    Ryan Barstow
    ------------------------------



  • 4.  RE: Same Time Period Help?

    Posted 03/29/22 03:33 AM
    Hy Ryan,

    If you are using a data module, it would be a good idea to use relative data analysis:
    https://www.ibm.com/docs/en/cognos-analytics/11.2.0?topic=modules-relative-date-analysis


    This is not the complete list.

    Best regards,

    ------------------------------
    Patrick Neveu
    Positive Thinking Company
    ------------------------------



  • 5.  RE: Same Time Period Help?

    Posted 03/29/22 11:50 AM
    Hi Ryan, 

    Have you taken a look at the relative time calendar in the samples and Accelerator Catalog. It might be what you are looking for.

    ------------------------------
    ROBERT PANGBORN
    ------------------------------



  • 6.  RE: Same Time Period Help?

    Posted 03/29/22 12:10 PM
    Please be aware that you might have to adjust the relative time calendar filters regarding filtering one specific date (= ...) or a time period (between ... and ...) if neccessary

    ------------------------------
    Philipp Hornung
    ------------------------------