COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: cognos05 on 11 Feb 2015 04:39:37 PM

Title: Conditional formating on a calculated column.
Post by: cognos05 on 11 Feb 2015 04:39:37 PM
I have a simple crosstab report with dimensional data source.

SalesMeasure
Reps                  2014     QuotaMeasure2         (2014-QuotaMeasure2)

A                      234          250                            -16
B                     3534         1500                          1834
C                     3434          1500                          1934

I wanted to show conditional formatting on (2014-QuotaMeasure2) column. If the value is postive green background and negative background .
I created a boolean variable with a condition Query1.(2014-QuotaMeasure2) >=0
Then for yes I did select the cells belonging to it and chose green back ground
for No  I did select the cells belonging to it and chose red back ground.

But my data is always highlighted with red even for positive numbers.

Is calculated column making some issue here.

Please advise.

Thanks,
Nithya
Title: Re: Conditional formating on a calculated column.
Post by: MFGF on 12 Feb 2015 04:36:16 AM
Quote from: nithya1224 on 11 Feb 2015 04:39:37 PM
I have a simple crosstab report with dimensional data source.

SalesMeasure
Reps                  2014     QuotaMeasure2         (2014-QuotaMeasure2)

A                      234          250                            -16
B                     3534         1500                          1834
C                     3434          1500                          1934

I wanted to show conditional formatting on (2014-QuotaMeasure2) column. If the value is postive green background and negative background .
I created a boolean variable with a condition Query1.(2014-QuotaMeasure2) >=0
Then for yes I did select the cells belonging to it and chose green back ground
for No  I did select the cells belonging to it and chose red back ground.

But my data is always highlighted with red even for positive numbers.

Is calculated column making some issue here.

Please advise.

Thanks,
Nithya

Hi,

Select the (2014 - QuotaMeasure2) column heading, then right-click and choose "Select Member Fact Cells"

Then use the Conditional Styles button on the toolbar - add a new conditional style based on the measure value (SalesMeasure) and enter your thresholds and colours as desired.

Cheers!

MF.
Title: Re: Conditional formating on a calculated column.
Post by: cognos05 on 12 Feb 2015 07:54:12 AM
Hi MFGF,

Thanks MFGF ,It worked. this may be a basic question, why should I base the conditional style on my SalesMeasure, it should be on my calculated column right, because
calculated column gives me the difference of my sale value on 2014 and the corresponding quota value.

I would appreciate, if you could make it clear.

Thanks,
Nithya
Title: Re: Conditional formating on a calculated column.
Post by: MFGF on 12 Feb 2015 10:04:14 AM
Quote from: nithya1224 on 12 Feb 2015 07:54:12 AM
Hi MFGF,

Thanks MFGF ,It worked. this may be a basic question, why should I base the conditional style on my SalesMeasure, it should be on my calculated column right, because
calculated column gives me the difference of my sale value on 2014 and the corresponding quota value.

I would appreciate, if you could make it clear.

Thanks,
Nithya

Hi,

It's your measure value that is getting displayed in the cells here though - right? Whether it's a direct tuple based on an intersection, or a calculated tuple, it's still your measure.

MF.