Forum Discussion
shawndempsey7
11 months agoFrequent Visitor
Return all week numbers in a range
I have a large number of start and stop dates that align with employee identification numbers, and I want a count of all of the weeks that their ranges cover. Can I do this in Power BI? Thank you! ...
- 11 months ago
You've provided your expected result but the solution depends on the actual data. We don't know what your tables look like. Are the weeks broken down into days or just a week start and end dates? Assuming that's the structure of your weeks table, please see the attached sample pbix
- 11 months ago
Shahid12523
Community Champion
11 months agoCreate a Date table with Date, WeekNum, and YearWeek (e.g., "2025W01").
Expand each employee’s date range using CALENDAR(StartDate, EndDate).
Join with the Date table to get YearWeek for each date.
Summarize by YearWeek to count how many employees are active per week.
- shawndempsey711 months agoFrequent Visitor
Thank you,
Unfortunately, I'm getting a "The date column must have unique values." message when I attempt to created a date table.