COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Analysis Studio => Topic started by: kado on 21 Apr 2010 12:50:15 PM

Title: Summing a NULL with a number = NULL
Post by: kado on 21 Apr 2010 12:50:15 PM
Hello, ???

Within Analysis Studio 8.4 sourcing a cube we are experiencing the following issue:

Within a SET of members there are certain members that we would like to add together to get a TOTAL for that sub-group. BUT when I add 2 members whereupon 1 of the values is NULL, the result is NULL.

For instance:

Mem1 = 100
Mem2 = NULL

result = NULL (whereas it should be 100)

Is there a workaround in Analysis Studio or perhaps a setting we can change? I know if we port it over to Report Studio that we could get around that but we don't want our users to have to do this.

THANKS,
kado
Title: Re: Summing a NULL with a number = NULL
Post by: blom0344 on 16 Jul 2010 06:15:40 AM
Quote from: kado on 21 Apr 2010 12:50:15 PM


Mem1 = 100
Mem2 = NULL

result = NULL (whereas it should be 100)


Fundamentally  100 + null = null.  The Null value should be seen as 'unknown'. Adding an unknown value to a known one yields an unknown value. Your measures should basically default to zero prior to using them in a reporting tool.

Title: Re: Summing a NULL with a number = NULL
Post by: kado on 19 Jul 2010 11:27:42 AM
Thanks for the feedback ... I see your point!