Forum Discussion
How to sort column by custom?
How to sort column by custom?
I want to sort column status by completetd, on the way, cancel, error, blank
now I use DAX as below.
if [status] = "Completed" then 1 else if [status] = "on the way" then 2 else if [status] = "cancel" then 3 else if [status] = "error" then 4 else 5
It I want more sort , If status = on the way I want to sort %progrees from ascending.
Guide me please.
- Anonymous5 years ago
HI Anonymous,
Perhaps you can take a look at the following links about creating a 'custom sort table to sort' and 'sorting by multiple columns' if they help:
Sorting by multiple columns
Regards,Xiaoxin Sheng
4 Replies
- amitchandakSuper User
Anonymous , not very clear. You can mark the new column as sort column for status
https://docs.microsoft.com/en-us/power-bi/desktop-sort-by-column
or refer: https://www.youtube.com/watch?v=KK1zu4MBb-c
I did not get the % part
- AnonymousNot applicable
- amitchandakSuper User
Anonymous , In Matrix, you can sort by Column(pivot). of Grand total of values (on column) that are the only option.
Column order (on header, in case of pivot) can only be based on sort column/column)
- AnonymousNot applicable
HI Anonymous,
Perhaps you can take a look at the following links about creating a 'custom sort table to sort' and 'sorting by multiple columns' if they help:
Sorting by multiple columns
Regards,Xiaoxin Sheng