Forum Discussion
personalized sort in matrix or chart
Hi everyone,
I trying to have a personnalized sort in matrix or chart (not my tables), and I don't find in the dimension parameters where I could define the sort.
On Qlik, there are sorting parameters for each dimension of the matrix or chart, and it can be done with a formula (for instance : WildMatch(ART_cat4, '*nett*', '*essen*', '*solu*', '*spé*','*corps*','*maq*','*abso*','*autre*') which means sort the ART_cat4 first with, ART_cat4 containing "nett", then "essen" and so on). As you can see it is not alphabetical nore numerical.
How could I do that on Power BI ?
Thanks a lot !
5 Replies
- amitchandak
Super User
In power, Bi sort can be changed using a sort by column
refer : https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column
Dax text functions: https://docs.microsoft.com/en-us/dax/switch-function-dax
https://docs.microsoft.com/en-us/dax/search-function-dax
https://docs.microsoft.com/en-us/dax/text-functions-dax
Or power query M text functions can help : https://docs.microsoft.com/en-us/powerquery-m/text-functions
- AnonymousNot applicable
Hi amitchandak I read this article before, but it wasn't of any help, as I don't want to sort by an alphabetical order nore by a numerical order, it beign ascending or descending.
- v-gizhi-msft
Community Support
Hi,
Please try to add an index column in Query Editor first.
Then sort the target column by this index column.
Hope this helps.
Best Regards,
Giotto
- AnonymousNot applicable
hi v-gizhi-msft thanks for your suggestion. I will try this way. I hoped there was a solution without adding any new column as in my opinion it complexifies a lot the final model.
- v-gizhi-msft
Community Support
Hi,
I think if you want to sort the data like my sample posted last week by numerical, you should have to add an index column as an unique column to rank but no other way.
Best Regards,
Giotto