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

Shape the future of the Fabric Community! Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions. Take survey.

Kaviraj11

PowerBI - Custom Sort

Custom Sorting with Power BI

Custom sorting in Power BI can significantly enhance the clarity and impact of your data visualizations. However, users often encounter several challenges when setting up custom sorts. Here’s a look at some of the common hurdles and how to overcome them:

Step 1

Create a Custom Table with all the category either manually in Power Query or read from source.

Create a new column beside and provide the number in the order you want to arrange.

 

Kaviraj11_0-1731095696156.png

 

Step 2

Create a relationship between the column in actual table to the custom sort table.

Step 3

Create a column in Actual table with an expression.

Sort order = RELATED(CustomSortTable[Sort])

 

Step 4

Select the column you want to sort, and a “Column Tools” menu bar will appear at the top. Now Select the “Sort by column” and select the sort order column.

 

Kaviraj11_1-1731095839638.png

 

Comments

HI, @Kaviraj11 

Above approach is very useful but it create problem when you are dealing with Lengthgroup column because it preserve data lineage of "Sort" Column, so when you try to remove Filter context from Lengthgroup it don't allow you to remove Filter context from Lengthgroup staightforward way.