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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

Column sorting in matrix visual - Sort By Column not working

I am using the Matrix visual Trying to sort by a column that is not shown in the Matrix. I applied sorting at the Data Model, but this is having no effect on the Visual level. This is what I am trying to do :

 

  1. Date column - MM/DD/YYYY, this is the column I want to use to sort in Descending order.
  2. Date_MM_YYYY column - this is the column displayed in visual, it is a MMM YYYYY format (E.g. Aug 2018).

If I display the Date column it will use the sort order from the Model.

9 REPLIES 9
danb
Resolver I
Resolver I

@Anonymous

can you provide a sample of your data?

Anonymous
Not applicable

image.png

Some sample data. First I tried creating a calculated column at the Model Level to convert MM/DD/YYYY (Datetime in SQL) to MMM YYYY (Eg. Aug 2018...). This didn't work. I removed the calculated column and actually created similar column but in SQL code. Column is correctly displayed in the Data Model (see above), and the sort is correct (by the actuall full MM/DD/YYY descending order, see above). Nothing seems to work. It seems like only if a column is actually shown in the visual will the visual sort by it.

 

Notes :

 

  1. Using Power BI Desktop RS/PBIRS March 2018 version.
  2. Using the Matrix visual.

Hi @Anonymous,

Based on my test, you could use the "Sort by Column" function.

Sample data:

1.PNG

Choose the column you want to sort.

2.PNG

You can also download the PBIX file to have a view.

https://www.dropbox.com/s/4rplbfptgglnaaz/Column%20sorting%20in%20matrix%20visual%20-%20Sort%20By%20Column%20disabled.pbix?dl=0

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Thanks for your feedback. I tried this but it doesn't seem to work with the Matrix visual. I think this is just a limitation (or maybe a bug?) of the Matrix visual.

Hi @Anonymous,

Based on my test, it could work on my side, could you please share the pbix if possible or you could refer to this link:

https://community.powerbi.com/t5/Desktop/Custom-Sorting-in-PowerBI/td-p/126534

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

All the artciles I have seen so far refer to other visuals. I am using the Matrix visual, doesn't work in this type of visual.

 

To clarify, I renamed this issue to Column sorting in matrix visual - Sort By Column not working, the Sort by column button is enabled, but the Visual is simply not displaying correctly if the selected column is not visible in the Tablix visual.

Hi @Anonymous,

It could work on my side and I could not reproduce your problem, could you please share the pbix if possible or create a sample data to have a tets?

 

Regards,

Daniel He

Community Support Team _ Daniel He
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

I also have the same issue. I have two columns, one is sorted by the other. When I use these fields as columns in the matrix visual, the sorting no longer applies. 

 

Has anyone found a solution for this? 

Anonymous
Not applicable

Are you using the Matrix visual? I am using Matrix with March 2018 Power BI Desktop RS version.

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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