Forum Discussion
Column sorting in matrix visual - Sort By Column not working
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 :
- Using Power BI Desktop RS/PBIRS March 2018 version.
- Using the Matrix visual.
Hi Anonymous,
Based on my test, you could use the "Sort by Column" function.
Sample data:
Choose the column you want to sort.
You can also download the PBIX file to have a view.
Regards,
Daniel He
- Anonymous8 years agoNot 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.
- v-danhe-msft8 years ago
Microsoft Employee
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
- Anonymous8 years agoNot 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.