Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Ideas

Share your Designer Desktop product ideas - we're listening!
Submitting an Idea?

Be sure to review our Idea Submission Guidelines for more information!

Submission Guidelines

Average Ignoring Nulls

In the Formula Tool, there is an Average() function which can be used to take the average/mean of multiple columns or expressions. This function treats null values as zeroes. This was a surprise/dissapointment to me as I am used to other applications & systems where nulls are ignored, for example Excel. It would be useful to have either an AverageIgnoreNulls() function or an optional extra parameter to Average() which specifies that nulls should be ignored rather than treated as zeroes.

 

When wishing to average a small number of columns and ignore nulls, a formula can be constructed using Iif(IsNull([Column1]),0,[Column1]) for each column to calculate the total, and Iif(IsNull([Column1]),0,1) for calculating the count. This quickly becomes unwieldy for more than 2 or 3 columns.

13 Comments
jacob_camp
5 - Atom

@JohnJPS - Thank you for providing the screen capture of the workflow and the recommendation for the macro (it has been very helpful). Thanks for the work you and @jdunkerley79 for the My Formula AddIn. This would be a handy feature for formulas to have standard in a future release, as the workaround can grow to be a lot of more processing if there are a lot of new calculated fields.

AlteryxCommunityTeam
Alteryx Community Team
Alteryx Community Team
Status changed to: Accepting Votes
 
NicoleJ
Alteryx
Alteryx
Status changed to: Implemented

Community Idea cleanup time! This was actually implemented with the introduction of the AverageNonNull function option back in 23.1 😁