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
Anonymous
Not applicable

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.

 

 

1 ACCEPTED SOLUTION
v-shex-msft
Community Support
Community Support

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:

Custom Sorting in Power BI 

Sorting by multiple columns 
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.

View solution in original post

4 REPLIES 4
v-shex-msft
Community Support
Community Support

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:

Custom Sorting in Power BI 

Sorting by multiple columns 
Regards,

Xiaoxin Sheng

Community Support Team _ Xiaoxin
If this post helps, please consider accept as solution to help other members find it more quickly.
Anonymous
Not applicable

@amitchandak  Now I sort status completed as below.

adamasmay_1-1614742922100.png

 

But I want to sort % in graph from ascending.

 

 

 

 

@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) 

amitchandak
Super User
Super 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

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.