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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
U156531
Post Patron
Post Patron

Trying to sort a group in a slicer

I created a Group of days named Time to Close. I've put the group into a slicer but I'm having trouble sorting it. I've tried to use the Sort by column function but it does not allow me to choose the Days column that the group is based on. Is there another way to sort this slicer so that 1 to 3 Months and Over 3 months are at the bottom?

U156531_0-1728579776869.png

 

1 ACCEPTED SOLUTION

Hi! Apologies for the delayed response.

That depends on however your Time to Close Column is created. But you could create a SWITCH statement like so: 

ColumnOrder = 

SWITCH(
Table[Time to Close],
"1 Week",1,
"2 Weeks",2,
"3 Weeks",3,
"4 Weeks",4,
"1 to 3 Months",5,
"Over 3 Months",6,
7
)




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

3 REPLIES 3
ExcelMonke
Super User
Super User

Hello,

You can consider adding a "Order" Column to where this table is sourced from. So, for example, it could look like this:

Time to Close Order
1 Week 1
2 Weeks 2
3 Weeks 3
4 Weeks 4
1 to 3 Months 5
Over 3 Months 6

 

And then order it by the order column.

Should all else fail, a "brute-force solution" could be to rename your "1 to 3 months" row to "Between 1 to 3 Months", and it should show up as the second to last 🙂 





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





I like the idea of the order by colum but the table has hundreds of rows and is updated daily. Is there a programatic method to udate the order by column?

Hi! Apologies for the delayed response.

That depends on however your Time to Close Column is created. But you could create a SWITCH statement like so: 

ColumnOrder = 

SWITCH(
Table[Time to Close],
"1 Week",1,
"2 Weeks",2,
"3 Weeks",3,
"4 Weeks",4,
"1 to 3 Months",5,
"Over 3 Months",6,
7
)




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 community update carousel

Fabric Community Update - June 2025

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