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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
PowerBiNoob37
Helper I
Helper I

Calender Date Slicer for current week and sort by Weeknumber

Hi,

 

Ive got a problem building a dashboard, im trying to create a week date slicer for payroll in a datatable matrix,

 

My data is in the following format,

 

NameDateHours
Joe Blow1/01/200012
Mark Bob2/01/200012
Joe Blow2/01/200012
Mark Bob2/01/200012
Joe Blow3/01/200012
Elvis Presley4/01/200012
Joe Blow4/01/200012
Elvis Presley4/01/200012
Jillian Smith5/01/200012
Mark Bob5/01/200012
Jillian Smith6/01/200012
Mark Bob6/01/200012
Elvis Presley6/01/200012
Jillian Smith7/01/200012
Mark Bob7/01/200012
Jillian Smith8/01/200012
Mark Bob8/01/200012
Jillian Smith9/01/200012
Mark Bob9/01/200012

 

and ive attached the pbix file here

 

https://itminingautomationsolutions-my.sharepoint.com/:u:/p/admin/ETqApv8CYGJMlXaOmiQAYAMB_iFVds8ynj...

 

So ive added a weekday number and name, however can i get the dateslicer to somehow sort by week and maybe have a arrow to goto the previous week and the following week and in order?

 

PowerBiNoob37_0-1648116400407.png

 

like this but with perhaps a < > button.. i understand i can use relative dates.

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@PowerBiNoob37 , Create a sort column

 

Week name sort = weekday([Date],1)  //use 2 for Monday to be 1

 

MArk that as sort column of week day name

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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
v-zhangti
Community Support
Community Support

Hi @PowerBiNoob37 ,

 

You can try the following methods.

Column:

Weeknum = WEEKNUM([Date],1)

vzhangti_0-1648451656318.png

The weekly slicer can be presented in this way.

vzhangti_1-1648451681110.pngvzhangti_2-1648451700243.png

https://docs.microsoft.com/dax/weeknum-function-dax 

 

Best Regards,

Community Support Team _Charlotte

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

amitchandak
Super User
Super User

@PowerBiNoob37 , Create a sort column

 

Week name sort = weekday([Date],1)  //use 2 for Monday to be 1

 

MArk that as sort column of week day name

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

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.