
1. Re: Average Calculation Across Columns
Chris McClellan May 12, 2018 2:01 AM (in response to Matt Youngberg)1 of 1 people found this helpfulThis will work
(sum([C1])+sum([C2])+sum([C3])) / (count([C1])+count([C2])+count([C3]))

2. Re: Average Calculation Across Columns
Matt Youngberg May 14, 2018 10:57 AM (in response to Chris McClellan)Hey Chris McClellan,
Thanks for responding. It looks like it's calculating the number I'm expecting correctly, but I'm worried about one more thing regarding this code:
If I look at my data source row by row, the calculated field is returning a null value any time that it encounters a null cell in its computation, kind of like this:
C1 C2 C3 Calculated 1 0 1 0.666666 1 null 1 null 1 1 0 0.666666 0 1 1 0.666666 null 0 1 null 1 0 1 0.666666 When it does the calculation mentioned above row by row down the data source, I imagine that some of those SUM functions are finding null values since it's referencing just a null single cell in the column. If that's the case, my idea is that it is negating the entire equation as null when one of those SUM functions break.
Is that a correct diagnosis and is there a way to prevent that so that each row reports a value when you're asking the calculation to run at a rowbyrow level? Thanks for the help!

3. Re: Average Calculation Across Columns
Chris McClellan May 14, 2018 1:38 PM (in response to Matt Youngberg)1 of 1 people found this helpfulHmmm .... I haven't tested, but try this:
(sum(zn([C1]))+sum(zn([C2]))+sum(zn([C3]))) / (count(zn([C1]))+count(zn([C2]))+count(zn([C3])))

4. Re: Average Calculation Across Columns
Matt Youngberg May 15, 2018 2:20 PM (in response to Chris McClellan)Hey Chris McClellan,
I got it to work properly after removing the ZN function from the COUNT functions. Thanks so much for the help!