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
Ayupchap
Helper III
Helper III

Sorting a filter list

Hi there

 

Creating some excellent datasets which I filter using the filter tool.  Is there a way to customize the filter list order at all?  I'd like to change some around for improved usability if possible.

1 ACCEPTED SOLUTION

Go in Edit Queries and select the table you're referring to

 

Create a conditional column under "Add Column"

 

Do something like this for ALL the output values you have

sorter.png

 

When you're done, close and load.

Then go to the table view (the Table in the middle) in Power BI Desktop

sort2.PNG

 

Find your table, click the column you want to sort, go to "Modeling" tab and click "Sort by Column" and choose the column you just created in Query Editor

 

 

 

View solution in original post

5 REPLIES 5
shebr
Resolver III
Resolver III

Hi @Ayupchap

 

How do you want to order the items exactly? The default of course is alphabtically, numerically, what alternate do you want? Try and provide as much detail as possible.

 

Thanks

 

shebr

I have a list that states grades in a school, it pulls the data from an SQL statement via a OBDC connection

 

The list comes out as -1, 2, 3, 4, 5, 6, 7, 8, KG

 

We want it to come out - KG, 1, 2, 3, 4, 5, 6, 7, 8

 

Also we have lists of school names and they do list alphabetically but we want to list them in a list not based alphabetically but in order of when they opened. Is there a method to change the order of those at all?

 

I obviously do not want to edit the dataset being pulled in as it refreshes daily. 

Go in Edit Queries and select the table you're referring to

 

Create a conditional column under "Add Column"

 

Do something like this for ALL the output values you have

sorter.png

 

When you're done, close and load.

Then go to the table view (the Table in the middle) in Power BI Desktop

sort2.PNG

 

Find your table, click the column you want to sort, go to "Modeling" tab and click "Sort by Column" and choose the column you just created in Query Editor

 

 

 

Hi!

I have same issue but with "color status" Red, Amber, TYellow and Green.

I have created a calculated column with an IF: If "Red" then "A", etc. And the column looks perfect.

Now I try to select the color status parameter, going to Modelling/Sort by Column, and when selecting the calculated column, it says "This column cant't be sorted by a column that is already sorted, directly or indirectly, by this column".

Not sure what it means.

Any idea?

Thanks!! 

This is amazing!  Thanks so much!

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.