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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
powerbihelp87
Helper III
Helper III

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
Employee
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
Employee
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
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.