Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Create a sort column with Dax

Hi all,

 

I apologize if this has been asked before but I am stuck and haven't been able to find anything too similar.

 

I'm looking to create a sort column in my data so that I can sort my matrix by multiple rows. Let's say my columns are conference, soccer team, and goals. I want to sort first by the conference and have that sort be descending by count of goals, then the second sort would be by a pre-defined hierarchy of the teams within each conference. So team A, B, and C are within the western conference, and their respective hierarchy values are 2,1, and 3, then it would be sorted like this:

Where the reason the West conference appears before the East is because the total sum of goals is greater. I've been stuck on this forever and would really appreciate some guidance. 

  • Anonymous's avatar
    Anonymous
    5 years ago

    Anonymous 

    There is a sort feature for power bi visual, try first sort [Goals] by a click, and then second sort [conference] by holding shift and click on the field name.

     

    Paul Zheng _ Community Support Team
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
     

2 Replies

  • Anonymous , I check it out that you will sort not able sort on measure and then sub sort on row column .

  • Anonymous's avatar
    Anonymous
    Not applicable

    Anonymous 

    There is a sort feature for power bi visual, try first sort [Goals] by a click, and then second sort [conference] by holding shift and click on the field name.

     

    Paul Zheng _ Community Support Team
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.