COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: Aravinth on 04 Nov 2007 10:30:14 PM

Title: Supresing negative sign in a list total
Post by: Aravinth on 04 Nov 2007 10:30:14 PM
Hi

I have a requirement in my report where the negative sign need to be supressed while displaying the list total.

Sample dat of the list

Account No       Transactions         Overdraft amount
11111111               3                       -1000
22222222              10                        -100
33333333                5                      -2000
Total                    18                       3100

When I use abs() function for overdraft amount column all the values are getting converted to positive. I just want to supress the negative values in the total.

Can this be done in report studio?


Title: Re: Supresing negative sign in a list total
Post by: DSR on 05 Nov 2007 01:06:12 AM
Hi,

Take another column as below(make "Overdraft amount" column as +ve by *-1)

Account No       Transactions         Overdraft amount    Overdraft amount*-1
11111111               3                       -1000                     1000
22222222              10                        -100                     100
33333333                5                      -2000                     2000
Total                    18                        3100                       3100

Hide all red coloured cells, then u will get ur out put


    

Title: Re: Supresing negative sign in a list total
Post by: trevorp on 05 Nov 2007 04:24:29 AM
Hi

You could create a manual total along the lines of

TOTAL (IF (overdraft > 0) then (0) else (Overdraft))
Title: Re: Supresing negative sign in a list total
Post by: Suraj on 05 Nov 2007 08:23:15 AM
use a simple solution, do not complicate things.
Unlock the total cell and add a calculated field
abs(total ([overdraft amount] for report))