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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
aslan
Helper I
Helper I

Matrix - Sorting

Hi ,

 

In below image matrix grouping by rows and then sort by value. But it is not useful for my client.  8 value should be after the 16 but it is before in current logic. Can you please help me to fix it?

Correct order should be 17 - 16 - 16 - 8

srt.PNG

1 ACCEPTED SOLUTION
Sean
Community Champion
Community Champion


@aslan wrote:

Correct order should be 17 - 16 - 16 - 8

srt.PNG


 

If you want this order you need to swap the order in the Rows Field of you Matrix.

You currenty have cat/mod - you need mod/cat - but then I don't get how 6+16=16 on the 3rd line in your picture below the 8?

 

Matrix Sorting2.png

 

And if you want to see what sorting at each level in Excel is - here's a picture... (and this is obviously a very simple example)

 

Matrix Sorting.png

 

Good Luck to you! Smiley Wink

 

View solution in original post

4 REPLIES 4
Sean
Community Champion
Community Champion


@aslan wrote:

Correct order should be 17 - 16 - 16 - 8

srt.PNG


 

If you want this order you need to swap the order in the Rows Field of you Matrix.

You currenty have cat/mod - you need mod/cat - but then I don't get how 6+16=16 on the 3rd line in your picture below the 8?

 

Matrix Sorting2.png

 

And if you want to see what sorting at each level in Excel is - here's a picture... (and this is obviously a very simple example)

 

Matrix Sorting.png

 

Good Luck to you! Smiley Wink

 

The Matrix visual lacks functionality.  There are lots of ideas on the community site.  Below are the front runners.  Please vote these up!

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/11185431-add-a-multiple-columns-s...

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/17401381-conditional-formatting-f...

Sean
Community Champion
Community Champion

In response to an email I had received to take a survey on how to improve to Matrix/Table visualizations

One of the things I suggested to them in the survey was improved sorting options for the Matrix

I later posted that as a comment here... which you can see below (from October 27, 2016)

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/15844186-pivot-tables-and-breakdo...

Are you asking about something like this?

 

Please consider adding Sorting Options in the Matrix as those available for the Pivot Table which allows for sorting at EACH level.
For example in Excel if you have this Pivot Table setup:
Rows: Year, Type, Company and Location
Columns: Month
Values: Total Revenue (Measure)
In a Pivot Table you can sort at each level! (without disrupting the sorting at the other levels)
So you can sort your Year descending by Year, Type ascending by Type, Company also ascending by Company and lastly Location descending by Total Revenue. So in Excel you will always be looking at the current Year (on top), followed by Type and Company (A to Z) and only your Locations will be sorted based on Total Revenue best to worst. And by the way all previous years are collapsed only showing annual totals but you can always open a certain year and find what you are looking for. Now if you want to you can go and sort at the Company level but this time descending by Total Revenue (instead of by Company A to Z). Again Year and Type will not be disturbed you will get your current Year (on top) followed by Type (A to Z) and then the Companies will be sorted best to worst based on Total Revenue and the Locations for each Company will also be sorted best to worst based on Total Revenue. None of this is currently possible in the Matrix! Thanks!

 

EDIT: I didn't mention the Month Column but of course you can sort it also to show the Months either Jan to Dec or Dec to Jan!

For example in beginning of the Year you can sort Jan to Dec but closer to the end you can reverse the order Dec to Jan

so you see the most recent data first (meaning on the left side in the table).

 

 

I really don't understand in your comment what you explain? Is ıt possible in PowerBI or not?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.