COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: mp3909 on 20 Apr 2021 01:31:18 PM

Title: Can you refer to singletons in a data expression?
Post by: mp3909 on 20 Apr 2021 01:31:18 PM
Hi,

I wanted to know how to go about referencing singletons?

For example, I have a query called q1.
Inside q1, I have a data items called d1, d2, d3.
And in my report I have singleton s1 and s2

I want to write an expression for d1 so I click on data expression and inside there, I want to write a case when statement like the following:

CASE
WHEN [q1].[d2] = 'X' then s1
WHEN [q1].[d3] = 'Y' then s2
END


Is this possible?

Thanks in advance.