Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

What DAX function to use to show quartiles

Hi

 

I need to show the amount of employee's in each quartile by their pay by gender.

 

I have gender and amount. I want to be able to show something like the following;

Is there a DAX Function i can use to split my data into quartiles?

 

thanks in advance.

 

  • Anonymous's avatar
    Anonymous
    3 years ago

    Hi  Anonymous 

    You refer to the following function.

    1.PERCENTILE.EXC(<column>, <k>)

    Returns the k-th percentile of values in a range, where k is in the range 0..1, exclusive.

    PERCENTILE.EXC function (DAX) - DAX | Microsoft Learn

    2.PERCENTILE.INC(<column>, <k>)

    Returns the k-th percentile of values in a range, where k is in the range 0..1, inclusive.

    PERCENTILE.INC function (DAX) - DAX | Microsoft Learn

     

    Best Regards!

    Yolo Zhu

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

     

6 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi  Anonymous 

    You refer to the following function.

    1.PERCENTILE.EXC(<column>, <k>)

    Returns the k-th percentile of values in a range, where k is in the range 0..1, exclusive.

    PERCENTILE.EXC function (DAX) - DAX | Microsoft Learn

    2.PERCENTILE.INC(<column>, <k>)

    Returns the k-th percentile of values in a range, where k is in the range 0..1, inclusive.

    PERCENTILE.INC function (DAX) - DAX | Microsoft Learn

     

    Best Regards!

    Yolo Zhu

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

     

    • MrA's avatar
      MrA
      New Member

      How do you apply this dynamically to a measure not a column? 

       

      • JasonWinnell's avatar
        JasonWinnell
        New Member
        Did you ever figure this one out? I am trying to do the same thing
  • Anonymous's avatar
    Anonymous
    Not applicable

    Thanks. This is giving me the value of the quartile, but how do I show how many employee's are in this quartile?
    I need to be able to get to the following;

     

    Top Quartile.  50 Males 100 Females

    Top Middle 60 Males 90 Females

    Lower Middle 80 Males 70 Females

    Lower Quartile 10 Males 140 Females

     

    For example.