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
DanielV
Regular Visitor

Sort table/multi-row card by another column

Hi,

 

I have a table containing three columns: Subject, Rank and DisplayIndex. I want to display only the Subject and Rank columns, either in a table or a multi-row card, but I need data to be sorted by the DisplayIndex column. 

 

I tried using the "Sort by Column" button: I selected the visual, then I selected the Rank field in the Fields pane, and then I checked the DisplayIndex field in the "Sort by Column" popup list. However, the table and the multi-row card don't seem to honor the "Sort by column" setting. 

Is there something I am doing wrong here or these visuals do not support the "Sort by Column" feature?

 

As a note, I know that I can add the DisplayIndex column to the table/multi-row card and then easily sort by it, but the DisplayIndex column should not be visible at all and I dit not find a way around this. 

3 ACCEPTED SOLUTIONS
Anonymous
Not applicable

@DanielV  - You can set the Sort by Column property of a column. Go to the Modelling tab in the ribbon, select a column from the Fields pane on the right, click Sort by Column and select the associated column:

Sort by Another Column.PNG

 

Hope this helps,

Nathan

 

View solution in original post

v-frfei-msft
Community Support
Community Support

Hi @DanielV ,

 

Based on my test using the sort by column option, that should work. Please select your subject column and make it sorted by displayindex column as the picture below.

 

Capture.PNG

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

View solution in original post

I've managed to make it work.

The problem was that the Value summarization was set to Sum by default. Once I set it to "Don't summarize", the sort behaved as expected.

 

pbixdemo.jpg

 

Here's a demo pbix (download). It has the Value summarization set to Sum.

 

Thank you!

View solution in original post

6 REPLIES 6
v-frfei-msft
Community Support
Community Support

Hi @DanielV ,

 

Based on my test using the sort by column option, that should work. Please select your subject column and make it sorted by displayindex column as the picture below.

 

Capture.PNG

 

Community Support Team _ Frank
If this post helps, then please consider Accept it as the solution to help the others find it more quickly.

I've managed to make it work.

The problem was that the Value summarization was set to Sum by default. Once I set it to "Don't summarize", the sort behaved as expected.

 

pbixdemo.jpg

 

Here's a demo pbix (download). It has the Value summarization set to Sum.

 

Thank you!

Anonymous
Not applicable

@DanielV  - You may also be interested in this idea for a functionality change:

https://ideas.powerbi.com/forums/265200-power-bi-ideas/suggestions/37174840-better-handle-column-typ...

Anonymous
Not applicable

@DanielV  - You can set the Sort by Column property of a column. Go to the Modelling tab in the ribbon, select a column from the Fields pane on the right, click Sort by Column and select the associated column:

Sort by Another Column.PNG

 

Hope this helps,

Nathan

 

@AnonymousThank you for your replay!

 

I have tried exactly what you suggested, with no results, unfortunately.

 

I have seen the sorted months example all over the internet but it doesn't work in my setup. It's true that I am not sorting a string column but a numeric one, and I am not working with a chart visual but with a table or multi-row card visual. Still, I haven't found any indication of limitation(s) of the "Sort by Column" feature that could explain why I can't make this work. So I must be doing something wrong. 

 

Needless to say, any suggestion would be highly appreciated, being in the form of a solution or a workaround.

 

Thank you in advance!

Anonymous
Not applicable

@DanielV  - Could you share a pbix? This should work.

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.