COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: leahmarie on 30 Jun 2011 02:42:24 PM

Title: Calculating totals with members with missing values
Post by: leahmarie on 30 Jun 2011 02:42:24 PM
Has anyone had any success with adding totals when there are missing values or divide by zero values?  I have tried using the coalesce function but I haven't had any luck.  I also tried a case statement with when is missing "0" but no luck with that either.  Any insight?

It is an OLAP cube. 
Title: Re: Calculating totals with members with missing values
Post by: RobsWalker68 on 01 Jul 2011 03:14:33 AM
Hi,

I would usually use an if statement so something like:

if ([TotalA] is null) then (0) else ([TotalA])
+
if ([TotalB] is null) then (0) else ([TotalB])


Rgds

Rob