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

Learn from the best! Meet the four finalists headed to the FINALS of the Power BI Dataviz World Championships! Register now

Reply
powerbihelp87
Helper IV
Helper IV

Sort on Matrix with unpivot data?

Hi! Is there a way I can sort by a row?  Below is a Matrix row example:

 

(Gross Sales, Profit, HR are value type.  The numbers are the value and the Brands are brand field)

 

 

Brand A

Brand B

Brand X

Gross Sales

10

33

42

Profit

422

30

90

HR

53

53

35

 

I want to sort by the Profit row so It should look like the below order?  Is there any way to achieve this (the data is unpivoted and won’t work if I pivot it since I want the data to appear in this same exact format)

 

Brand B

Brand X

Brand A

Gross Sales

33

42

10

Profit

30

90

422

HR

53

35

53

1 ACCEPTED SOLUTION
mahoneypat
Microsoft Employee
Microsoft Employee

You can accomplish this by making a matrix visual with your 3 measures in the values area, and in the format option choose "Show on Rows" in Values area.  Put your Brand column as the column headers, and then use the Ellipsis in upper right of the matrix to Sort by Profit.

 

If this works for you, please mark it as solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


View solution in original post

2 REPLIES 2
mahoneypat
Microsoft Employee
Microsoft Employee

You can accomplish this by making a matrix visual with your 3 measures in the values area, and in the format option choose "Show on Rows" in Values area.  Put your Brand column as the column headers, and then use the Ellipsis in upper right of the matrix to Sort by Profit.

 

If this works for you, please mark it as solution.  Kudos are appreciated too.  Please let me know if not.

Regards,

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


such an easy fix, don't know why I never use this without transforming everything! Thanks so much

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

February Power BI Update Carousel

Power BI Monthly Update - February 2026

Check out the February 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.