Forum Discussion
nlaauw
5 years agoRegular Visitor
Calendar dates aligning to weeks
Help! I have people attend training and need to analyse their attendance dates by date but also by term and week which align to school terms and weeks. The spreadsheet with the data only has the date...
- 5 years ago
Hi nlaauw ,
Please try the following formula:
Table = VAR StartDate = DATE ( 2021, 10, 4 ) VAR EndDate = DATE ( 2021, 12, 17 ) VAR S_WeekNum = WEEKNUM ( StartDate, 2 ) - 1 VAR DateRange = FILTER ( CALENDAR ( StartDate, EndDate ), NOT WEEKDAY ( [Date], 2 ) IN { 6, 7 } ) RETURN ADDCOLUMNS ( DateRange, "Week", "Week " & WEEKNUM ( [Date], 2 ) - S_WeekNum, "Term", 4 )If the problem is still not resolved, please provide detailed error information or the expected result you expect. Let me know immediately, looking forward to your reply.
Best Regards,
WinnizIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
KNP
Super User
5 years agoThe easiest way would be to create another table/spreadsheet that has dates and week numbers in it.
You could then merge this table with your data to include the week numbers.