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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
bwang2
Helper I
Helper I

Custom sort of my slicer dropdown

I have a slicer dropdown that contains the start date(mondays) of every 52 weeks in 2024 plus "Current Week" and "Last Week". it is current sorted in alphabetical order, either descending or ascending. I want them in the order of  "Current Week" first, "Last Week" second, following by calendar orders (Jan-Dec). How can I achieve this? Thanks!

bwang2_0-1714503153657.png

bwang2_1-1714503173343.png

 

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@bwang2 , You need a sort column for that , Make sure you have week start date or end date column, create based on date column

 

Week Rank = Switch(True(),

[Week Name] ="This Week", -1, 

[Week Name] ="Last Week", 0, 

RANKX('Date','Date'[Week Start date],,ASC,Dense)

)

 

and Mark this column as a sort column for your weekname column

 

How to Create Sort Columns and Solve Related Errors:
https://www.youtube.com/watch?v=KK1zu4MBb-c

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@bwang2 , You need a sort column for that , Make sure you have week start date or end date column, create based on date column

 

Week Rank = Switch(True(),

[Week Name] ="This Week", -1, 

[Week Name] ="Last Week", 0, 

RANKX('Date','Date'[Week Start date],,ASC,Dense)

)

 

and Mark this column as a sort column for your weekname column

 

How to Create Sort Columns and Solve Related Errors:
https://www.youtube.com/watch?v=KK1zu4MBb-c

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

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.