Hi Jason, I find this only works after three things are done
1) make sure the calculation is done before aggreation
2) set properties of the calculation field to measure
3) set the aggregation method to none
After that is done the If statement appears to work.
------------------------------
BILL DONOVAN
------------------------------
Original Message:
Sent: Thu January 09, 2020 12:19 PM
From: JASON TAVOULARIS
Subject: case statement calculation in dashboard
A syntax like the following works for me
IF ( YEAR = 2018 ) THEN ( REVENUE ) ELSE ( 0 )
------------------------------
JASON TAVOULARIS
Original Message:
Sent: Thu January 09, 2020 09:00 AM
From: BILL DONOVAN
Subject: case statement calculation in dashboard
Hi All,
I am trying to write a case statement in a Cognos 11.1.4 dashboard to limit a measure.
example
case when [year] = 2018 then [revenue] end
I am using this case statement as a filter to create a new measure that I can use in further calculations.
I am getting 0 as a result. However if I put year in the filters and revenue on the canvas and filter for 2918 I am getting a valid number.
Any suggestions?
------------------------------
BILL DONOVAN
------------------------------
#CognosAnalyticswithWatson