Can a Median be Zero? Yes and No

There are instances where a Median is Zero, but why?

8/11/20221 min read

What is Median? Median is the middle numbers of a set of numbers. In Excel or PowerBi, when working with data, the median can sometimes return a zero.

  • This is sometimes a result of negative numbers within the data set or a decimal number.

  • Is the data set a null?

sometimes it makes sense to remove zeros from the median calculation. However, we need to be aware that sometimes those zeros are exactly that.

If you've decided, "I don't want to use those zeros." then a simple calculation can fix that.

  • In Excel, you can exclude zeros or errors by applying the following formula.

    • =MEDIAN(IF(A1:A50<>0,A1:50)) then press Shift + Ctrl + Enter

  • For errors you want to remove errors, use:

    • =MEDIAN(IF(ISNUMBER(F1:F50),F1:F50)), press Shift + Ctrl + Enter keys

In the DAX language (for PowerBI), you can return the median and exclude errors, nulls, and zeros by doing the following: