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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
rbalza
Helper III
Helper III

How to get weekdays from a certain date?

Hi Folks,

 

Been wondering how to do this task. Say I have a date that starts from 11.Apr.2021, and I have Weekdays as a header.

 

Now, I want to automatically calculate the previous week based on the start date/timesheet date as per below table. So the table on weekdays would be backdated for a week. Appreciated your help on this one. 

Timesheet DateSundayMondayTuesdayWednesdayThursdayFridaySaturday
11-Apr-214-Apr5-Apr6-Apr7-Apr8-Apr9-Apr10-Apr
1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@rbalza , Previous weekday is 7 day behind , with help from date table

7 behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-7,DAy))

 

If they fixed week, first create a week in your date tbale

Any Weekday Week - Start From Any day of Week
https://community.powerbi.com/t5/Community-Blog/Any-Weekday-Week-Decoding-Date-and-Calendar-2-5-Powe...

 

Then use these blog for WOW

Power BI — Week on Week and WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-La...
https://www.youtube.com/watch?v=pnAesWxYgJ8

 

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@rbalza , Previous weekday is 7 day behind , with help from date table

7 behind Sales = CALCULATE(SUM(Sales[Sales Amount]),dateadd('Date'[Date],-7,DAy))

 

If they fixed week, first create a week in your date tbale

Any Weekday Week - Start From Any day of Week
https://community.powerbi.com/t5/Community-Blog/Any-Weekday-Week-Decoding-Date-and-Calendar-2-5-Powe...

 

Then use these blog for WOW

Power BI — Week on Week and WTD
https://medium.com/@amitchandak.1978/power-bi-wtd-questions-time-intelligence-4-5-98c30fab69d3
https://community.powerbi.com/t5/Community-Blog/Week-Is-Not-So-Weak-WTD-Last-WTD-and-This-Week-vs-La...
https://www.youtube.com/watch?v=pnAesWxYgJ8

 

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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

Top Solution Authors