Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

View discussion in a popup

Replying to:
rohit1991
Super User

Hi Jaspreet99 

In Power BI, text fields sort alphabetically by default. To apply a custom sort order (High >> Medium >> Low):

 

1. Create a SortOrder column (numeric) like:

    High = 1

    Medium = 2

    Low = 3

 

2. Create column:

SortOrder =
SWITCH (
    TRUE(),
    Categories[Category] = "High", 1,
    Categories[Category] = "Medium", 2,
    Categories[Category] = "Low", 3,
     4
)

 

3. Select the Category column >> Column tools >> Sort by Column >> choose SortOrder.

 

Now visuals will show High >> Medium >> Low instead of alphabetical.


Did it work? ✔ Give a Kudo • Mark as Solution – help others too!

View solution in original post