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

Get Fabric Certified for FREE during AI Skills Fest. This week only. Secure your voucher now.

Reply
powerbihelp87
Helper V
Helper V

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
May Power BI Update Carousel

Power BI Monthly Update - May 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.