O'Reilly logo

IBM Cognos 10 Report Studio Cookbook - Second Edition by Abhishek Sanghani, Ahmed Lashin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Formatting negative values

Business owners need to see the sales figures by month 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 / Year, Time / Month (numeric), and Sales fact / Quantity as columns.

Group Year and sort Month (numeric) in ascending order.

How to do it...

Showing negative values in red and between brackets is a familiar practice for analysts in tools like Excel. Here are the steps to create the exact same formatting in your reports:

  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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required