Original Message:
Sent: Wed July 26, 2023 02:49 AM
From: Marc Reed
Subject: Cognos 11.1.7
There are a few ways to do this.
The simplest way is if your crosstab columns are fixed, that you will always have the same columns regardless of the data. If so, then just create measures in the query for each column. With them being measures you can simply add additional calculations. In this case you could just end up with a list.
Looking at the names of your columns I think this looks viable.
If the columns are not fixed then you could just add 'grouping' calcs to your query.
For example, lets say my columns are A,B,C,D and I want A+B and A+B-C.
Add a new data item firstGroup like
name: first group; expression: case when col in ('A','B') then col end
Add a new data item firstGroupTotal like
name: firstGroupTotal; expression: case when col in ('A','B') then 'A+B' end
Put these as the column of your xtab. This will give you cols A,B then BLANK and 'A+B' and BLANK.
You can then use a conditional format to hide the blank columns.
Repeat this for the final set of columns, But the total column could just be a simple 'Total' data item.
To get the negative, assuming your data is always +ve, just change the underlying sign of the data so that it becomes negative. Then show negatives with no formatting.
Here is a page showing the intermediate steps:

------------------------------
Marc Reed
------------------------------