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
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
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.