Forum Discussion

aseagull's avatar
aseagull
Helper IV
4 years ago
Solved

Help with VALUES()

I am still very green in DAX. I simply want to find the median value of the distinct elements in a column. I tried to write this:

 

MEDIAN(VALUES(Table[Column]))

 

The error says that MEDIAN() only accepts a column reference. How do I tell it that the result of VALUES() is a single column?

 

Thanks,

Amon

  • Hi aseagull 

     

    Try to use MEDIANX rather than MEDIAN:

    Something like this:

    MEDIANX(VALUES(Table[Column]),Table[Column]))

    If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

    Appreciate your Kudos!!



     

1 Reply

  • Hi aseagull 

     

    Try to use MEDIANX rather than MEDIAN:

    Something like this:

    MEDIANX(VALUES(Table[Column]),Table[Column]))

    If this post helps, please consider accepting it as the solution to help the other members find it more quickly.

    Appreciate your Kudos!!