COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: davephall on 15 Apr 2010 04:46:48 AM

Title: Adding Null Cube Dimensions
Post by: davephall on 15 Apr 2010 04:46:48 AM
Hi there, I've got a report based on a powercube, which has a section with two dimensions at the same nesting level that I want to add together. I've used the formula [Capital Replacements] + [Capital Adaptations] to add the two together, which works fine.

My problems start when one of these returns a null due to the slicer applied to the report. This then returns a null result. Is there any way of changing nulls to zeros in this situation so that the calculation returns the other value?

Thanks In advance, Dave.
Title: Re: Adding Null Cube Dimensions
Post by: pratyush on 15 Apr 2010 04:51:33 AM
Quote from: davephall on 15 Apr 2010 04:46:48 AM
Hi there, I've got a report based on a powercube, which has a section with two dimensions at the same nesting level that I want to add together. I've used the formula [Capital Replacements] + [Capital Adaptations] to add the two together, which works fine.

My problems start when one of these returns a null due to the slicer applied to the report. This then returns a null result. Is there any way of changing nulls to zeros in this situation so that the calculation returns the other value?

Thanks In advance, Dave.


Hi

Before doing your " [Capital Replacements] + [Capital Adaptations] "  have a if loop for checking a NULL value .. if you get a NULL value then assign it as 0 ...

Cheers ...
Title: Re: Adding Null Cube Dimensions
Post by: davephall on 15 Apr 2010 06:34:01 AM
Now you say it, it's obvious! For some reason I didn't think that'd work in a powercube. It worked perfectly, thanks for your help!

Dave.