In Cognos 8.4 Report Studio: I have a crosstab with budget pools on the vertical axis and budgets, actuals within year on the horizontal axis:
Pool | | Budget | | Actual | | Var | |
Pool 1 | | 20 | | 15 | | .25 | |
Pool 2 | | 10 | | 12 | | -.2 | |
Budget and Actuals are members from the data source.
Var is a calculated member: ((Budget - Actual) / Budget)
The measure is dollars
I am trying to format the Var column background color using conditional formatting. The colors will be Red, Yellow, Green, Blue. For now I am just using two colors (Red or Green) to try to make this work, then I will build out the rest.
I have defined a variable "Status Color" with the following syntax:
if ([Query1].[Var] < 0) then ('Red') else ('Green')
I created two "Values" on the Variables screen for Status Color: Red, Green
On the crosstab, I clicked the member fact cell for the Var column, and changed the Style Variable property to "Status Color". Then, with the member cell still highlighted, I hovered over the Condition explorer and clicked Red, then set background color to Red. I clicked Green and set BG color to Green. I set the (other) value BG color to Yellow.
When I run the report, all of the cells in the Var column come out with BG color Yellow which is the (Other) format. The cell values in the column are sometimes positive, sometimes negative, sometimes zero. I expect the negatives to be Red and the positives Green.
What am I doing wrong?