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.  What's Wrong With this Expression?

    Posted 08/04/20 03:21 PM

    Hi,

    Here is my input: IF ([Step Date] '>=2020-08-04 -7' ) THEN   (count ([Email Address]) 

    Defined: If the step date is greater than or equal to 7 days in the past, then count the email address.

    To provide context, I have a list of email addresses and step dates associated with them for the year. I want to get a count of only the email addresses with step dates that are at least 7 days old.

    Am I missing something with this expression? Please help!






    #CognosAnalytics
    #CognosAnalyticswithWatson
    #Support
    #SupportMigration


  • 2.  RE: What's Wrong With this Expression?

    Posted 09/18/20 11:25 PM

    Hi, try this [Step Date] >= _add_days(current_date,-7)

    In your query, you could add the statement above as a filter, then make a data item with expression: count([Email Address]) as your measure.

    Or in your statement: IF ([Step Date] >= _add_days(current_date,-7)) then (count([Email Address]) ) else (0)

    You might try less than or equal if you want to get dates 7 days past and older [Step Date] <=_add_days(current_date,-7).

    If you want 7 days past and newer, then use greater than or equal. Hope this helps.






    #CognosAnalytics
    #CognosAnalyticswithWatson
    #Support
    #SupportMigration