Blog Post

Power BI Community Blog
1 MIN READ

PowerBI - Custom Sort

Kaviraj11's avatar
Kaviraj11
Icon for Solution Sage rankSolution Sage
1 year ago

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.

 

 

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.

 

 

Published 1 year ago
Version 1.0

1 Comment

  • Dangar332's avatar
    Dangar332
    Icon for Resident Rockstar rankResident Rockstar

    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.