COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: actcognosuser on 30 Jan 2015 03:10:22 PM

Title: How to change background of crosstab based on column heading?
Post by: actcognosuser on 30 Jan 2015 03:10:22 PM
Hello all,

My Crosstab headers are dates.measure is Revenue.
boolean variable is (If the date = 2015-01-01) then the revenue should have a background
of red.

Does not work with conditional or style variable?

Does this work only with a measure comparison?

Title: Re: How to change background of crosstab based on column heading?
Post by: Robl on 30 Jan 2015 04:39:16 PM
I'm pretty sure conditional styles only work on measures.
So, create another measure based on ;
If date = whatever then 1 else 0

Nest both the measures in the crosstab at the right of the dims.
Build the cond format as normal: which if memory serves will be applied to both rows because they are both measure cells.
Then hide the second measure with box type none.
If you want to hide the main measure title box then set the text item to box type none, and the size and passing of the cell to 0.
Title: Re: How to change background of crosstab based on column heading?
Post by: actcognosuser on 03 Feb 2015 01:11:28 PM
Thanks Robl.

But did you mean nesting the date and new measure on the column level or row level.

Nesting at the column did not work?
Title: Re: How to change background of crosstab based on column heading?
Post by: actcognosuser on 03 Feb 2015 01:23:53 PM
Never Mind. Got it to work. Used the variable from the measure in the condition. Did not have to  nest the column.