COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: chris2001dc on 19 Mar 2009 08:47:46 AM

Title: Zeros or null in average
Post by: chris2001dc on 19 Mar 2009 08:47:46 AM
Hi,

I'am working with Cognos 8.3 and I'am trying to get the average, but I need to include the zero or null values in this calculation, how should I do it?

Thank you.
Title: Re: Zeros or null in average
Post by: blom0344 on 19 Mar 2009 12:16:56 PM
averages should xclude nulls , but not zeroes. To take  null into account use the coalesce function within the average expression to force nulls to be treated as zeroes..