If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Adding columns when some values are null.

Started by jcuiskelly, 26 Aug 2008 12:33:34 PM

Previous topic - Next topic

jcuiskelly

Working in Report Studio, a List Report has five columns of data that needs to be added together.  Not all the columns will have a figure per row.  Using Query Calculation from the Insertabe Objects Toolbox, I do not know how to write the Expression Definition when nulls are involved.  How to you write the Expression for:

Column1 plus Column2 plus Column3 plus Column4 plus Column5 equals Query Calculation column?
100         +    100        +                +   100         +                 =     300

Thank you in advance.

blom0344


ssssss

It seems now working in following statement

coalesce(percentage([some items]),0)

any ideas?

Thanks

blom0344

The idea is to transfer nulls to zero's BEFORE performing an arithmetic operation.
In your case it is the other way around..