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
croberts21
Continued Contributor
Continued Contributor

Let Date Slicer begin date and end date check for day of week, and calculate end date

I have Free PBI Desktop v2.100.1182 (64 bit free version Dec 2021) on Windows 10.

 

I have to write a payroll report. Payroll is 2 periods but for PBI I will make one matrix for one week, another matrix for a second week, both on the same page. Each week needs a date slicer to choose a date range, a beginning date and end date. I'd like to do some checking on the day of week for the beginning date and end date of the date slicer.

  1. I'd like to check that the first date is a Sunday.
  2. When the user enters the first date, I'd like to have the ending date be the following Saturday, or First Date + 6. Pay weeks must go from Sunday through Saturday.
  3. If the user enters or chooses an end date, I'd like to check that it's a Saturday.

Is it possible to add this to your TODO list please? Date slicer validation by the report designer would help a lot.

 

Thanks!

 

EDIT: Sorry, to make my minor edit I had to remove the "Reports" tag/label.

1 REPLY 1
amitchandak
Super User
Super User

@croberts21 , Not very clear

 

new columns

Week Start date = 'Date'[Date]+-1*WEEKDAY('Date'[Date],1)+1
Week End date = 'Date'[Date]+ 7-1*WEEKDAY('Date'[Date],1)

 

 

measure based on the selected date

 

Week Start date = selectedvalue('Date'[Date])+-1*WEEKDAY(selectedvalue('Date'[Date]),2)+1
Week End date = selectedvalue('Date'[Date])+ 7-1*WEEKDAY(selectedvalue('Date'[Date]),2)

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.