Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
dpell3
New Member

Sorting Matrix Table Values

Hi everyone, I'm trying to sort the following values to arrange the matrix with the SWITCH function to avail:

 

Sort = SWITCH('Merged Data'[Action], "Market", 1, "Region", 2, "National", 3, "Received", 4)

DGPBI1.JPG

 

 

I'm trying to get the table to look like this:

Market

- No BOM Order Found

- BOM in Draft

- Pending Market Review

- Review Shortage

Region

- Pending Regional Review

- ...

- ...

- ...

National

- ...

Received

- ...

 

Anyone aware of a simpler way to sort rows/columns?

 

Many thanks!

1 ACCEPTED SOLUTION
edhans
Super User
Super User

You would need to create one of two things:

  • Child tables that had your main headings (Market, Region, etc) with a second field with 1, 2, 3, 4, etc in them. Then select your main heading, Modeling tab, sort by column, and pick the second field.
    • repeat for the sub heading (BOM in draft, No BOM order found), etc.
  • or add a column to the main table that has Market, Region ,etc. but for Market, 1 (your sort code) would have to repeat for every occurance of Market, 2 to repeat for region ,etc. 

See this article for a more detailed overview of how to sort by another column rather than just alphabetically.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

View solution in original post

1 REPLY 1
edhans
Super User
Super User

You would need to create one of two things:

  • Child tables that had your main headings (Market, Region, etc) with a second field with 1, 2, 3, 4, etc in them. Then select your main heading, Modeling tab, sort by column, and pick the second field.
    • repeat for the sub heading (BOM in draft, No BOM order found), etc.
  • or add a column to the main table that has Market, Region ,etc. but for Market, 1 (your sort code) would have to repeat for every occurance of Market, 2 to repeat for region ,etc. 

See this article for a more detailed overview of how to sort by another column rather than just alphabetically.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.