COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Reporting => Topic started by: drewski3420 on 22 Jan 2021 03:16:42 PM

Title: Conditional style based on List Cell value, not Query Item
Post by: drewski3420 on 22 Jan 2021 03:16:42 PM
Is it possible to format a text item based on the value of that item, rather than based on the value of the field that item contains?

I am displaying a table with several rows and columns. In each of these cells is a text item whose source type is a different Data item value. Some of these values are above a threshold, some are below. I'm trying to change the color of the text item's font to red or green, depending on whether the value is above or below the threshold.

Selecting one text item, I can apply a conditional style where [Field1] >= <<threshold>>. But when I move on to the next cell, I have to create another conditional style: [Field2] >= <<threshold>>. Etc, etc for each of my several dozen cells.

What I'd really like to do is to create a single style that just evaluates the current cell value. I found the CellValue() function, but that appears to be only available for crosstabs, not lists. But ideally the formula would just be something like TextItemValue() >= <<threshold>>, then I apply that style to all of my cells.

Is this possible? Something so simple in Excel, for example, seems so much harder in Cognos!

-Drew