COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: jbertrand on 10 Nov 2013 11:29:14 PM

Title: Member Caption won't display when using IF statement
Post by: jbertrand on 10 Nov 2013 11:29:14 PM
Hi all,

I've built a simple crosstab off a transformer cube, and one of the columns is defined by:

PreviousPeriod:
if (ordinal(level([Period]))=1)
then
(prevMember([Period]))
else
(parallelPeriod(level(parent([Period])),1,[Period]))

and [Period] is defined as:
#prompt( 'pDate', 'MUN', '[Current Month from Hierarchy]') #

So basically, it shows me a previous period from different areas in the hierarchy based on what the user has selected

This all works perfectly, but for one problem. The crosstab column header always shows "PreviousPeriod" and not the actual caption of the member. So I would expect "Oct/2013' or '2013', but it always gives 'PreviousPeriod', which is just the default label of the dataitem. If I just use 'parallelPeriod(level(parent([Period])),1,[Period])' as the expression it shows correctly, but this is not what I want.

I've tried using the rolevalue for level number, and converting to a case statement, but no luck.

Any ideas what this could be?

Thanks

John










Title: Re: Member Caption won't display when using IF statement
Post by: Francis aka khayman on 11 Nov 2013 10:22:53 PM
try to change the Source Type property from Member Caption to Data Item Value