cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
aslan Regular Visitor
Regular Visitor

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

Accepted Solutions
Sean Super Contributor
Super Contributor

Re: Matrix - Sorting


@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

3 REPLIES 3
Sean Super Contributor
Super Contributor

Re: Matrix - Sorting

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).

 

 

aslan Regular Visitor
Regular Visitor

Re: Matrix - Sorting

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

Sean Super Contributor
Super Contributor

Re: Matrix - Sorting


@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

Helpful resources

Announcements
Can You Solve These Challenge

Challenge: Can You Solve These?

Find out how to participate in the first Power BI 'Can You Solve These?' challenge.

New Badges

Incoming: New and Improved Badges

Exciting news: We've given our badges an overhaul and added brand news ones.

Ask Amir Anything

Exclusive LIVE Community Event No. 2 – Ask Amir Anything

Next in our Triple A series: Ask Amir Netz questions about the latest updates, features and future.

Analytics in Azure virtual event

Analytics in Azure virtual event

Experience a limitless analytics service built to ingest, prep, manage, and serve data for immediate use in Power BI.

Users Online
Currently online: 149 members 1,963 guests
Please welcome our newest community members: