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

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
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.