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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

Reply
SoDoLabs
Regular Visitor

Sort Slicer Value By A Different Column

Hi,

I'm trying to sort the values in a slicer based on a different column within the same table. I was able to find the following post; however, the solution didn't work at my end.

https://community.powerbi.com/t5/Desktop/How-can-I-sort-the-text-values-in-a-filter-object/m-p/24603...

I followed the post and made sure I set Sort by Column with the column that I want to use for sorting, but I’m not seeing the expected sorting results.

 

I would like to see slicer values in the following order:

  • CCC
  • DDD
  • AAA
  • BBB Picture1.png

 

Thank you for any help you can offer!

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

Hello @SoDoLabs 

What you need to do is select the column you are trying to sort (name in this case) then in the sort by drop down pick the column you want to use (order).

 

SortByOrder.jpgSortByOrderFixed.jpgSortByOrderSlicer.jpg

View solution in original post

5 REPLIES 5
jdbuchanan71
Super User
Super User

Hello @SoDoLabs 

What you need to do is select the column you are trying to sort (name in this case) then in the sort by drop down pick the column you want to use (order).

 

SortByOrder.jpgSortByOrderFixed.jpgSortByOrderSlicer.jpg

Hello,
Do you know why when I select a value in another slicer concerning the same table it sorts back alphabetically the slicer (normally sort by a column i choose) ?

Thanks in advance
Gabriel

@GabrielC78 

I don't, mine does not behave that way.  You can see the months stay sorted in the correct order even when I apply a filter to the Day slicer.  Both of these fields are from my Dates table.

jdbuchanan71_0-1661526851393.png

 

Hello and thank you for your reply,
You right but i identified something strange.
Here is my columns, "colonne1" is sort by "colonne2"

GabrielC78_1-1661527795606.png
My Slicer is correctly sorted :

GabrielC78_2-1661528459099.png
Now, when i filter first "colonne1" and after "colonne3" the colonne1 slicer is sort because the 2 values A and D exist for xx. But B and C do not exist for xx and remains displayed in the slicer but not sorted.

GabrielC78_0-1661527763689.png

Do you know a way to auto unselect B and C when i select xx value ? 

@jdbuchanan71 ,

 

It makes so much sense now. Thank you for your response!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

Feb2025 NL Carousel

Fabric Community Update - February 2025

Find out what's new and trending in the Fabric community.