Running difference: Negative values in brackets and red

Business owners need to see the sales figures by months and their month-on-month difference.

If the difference is negative (fall in sales) then it needs to be shown in red and values need to be in brackets.

Getting ready

Create a simple list report with Time Dimension | Current year, Time Dimension | Current month, and Sales fact | Quantity as columns.

Group Current year and sort Current month ascending.

How to do it...

  1. Add a new query calculation to the list. Define the expression as:
    running-difference([Quantity])
    

    Call this item as "Running Difference".

  2. Open the Data Format properties for this calculation from Property list.
  3. Set the Format type as Number and the Negative Sign Symbol as brackets ...

Get IBM Cognos 8 Report Studio Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.