
1. Re: Calculating on Null Value
Mark Holtz Nov 7, 2012 1:59 PM (in response to Ryan Szymanski)6 of 6 people found this helpfulHi Ryan,
By default, NULL does NOT signify a value of zero, but rather the absence of any data with which to compute a calculation. A simple example is if you have values of 10, 20, 30 and NULL, the AVG function will compute (10+20+30) / 3 = 20 and NOT (10+20+30+0) / 4 = 15
To force the calculation to treat NULL as 0 and achieve the 15 with the AVG function, you could create a calculated field as:
IFNULL([MeasureField],0)Then, use this alternate field in your view instead of the original measure with NULL values and your calculations and aggregations should treat the NULL values as 0.
Hope this helps!

2. Re: Calculating on Null Value
Alex Kerin Nov 7, 2012 2:24 PM (in response to Mark Holtz)8 of 8 people found this helpfulzn([MeasureField]) will do the same as well.  zn is Zero Null

3. Re: Calculating on Null Value
Ryan Szymanski Nov 8, 2012 7:20 PM (in response to Alex Kerin)Thanks Mark, Alex,
Have ordered both formulas on my [measure], though perhaps not applying it correctly, calculated fields are continue to ignore these (blank) fields.
Have applied the following calculations. in case misappropriated, can either correct my application.
= IFNULL([%MV],0)
= zn([%MV])
Thanks again,

4. Re: Calculating on Null Value
Alex Kerin Nov 8, 2012 8:46 PM (in response to Ryan Szymanski)Can you simplify the book and show exactly where it's not working?

5. Re: Calculating on Null Value
Joshua Ng Aug 15, 2013 3:17 AM (in response to Ryan Szymanski)I tried this and it works.
IF ISNULL(ATTR([secondary datasource field])) THEN 0 ELSE SUM([secondary datasourcefield]) END
