Forum Discussion
shawndempsey7
10 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! ...
- 10 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
- 10 months ago
Ashish_Mathur
Super User
10 months agoAs requested, please also share a Calendar table with a week number column (since i do not know what the start and end of week is for you). Also, for a few rows of the sample data, show the expected result.
shawndempsey7
10 months agoFrequent Visitor
Sorry...hope this clarifies:
| TM# | LWD Total | RWD Total | Absence Day Counts Lost Restricted Date | LWD End Date | RWD End Date | Absense Week Start | LWD Week End | RWD Week End | Year-Week | Desired LWD Result | Desired RWD Result |
| 3920 | 31 | 0 | 1/1/2024 | 2/1/2024 | 1/1/2024 | 1 | 5 | 1 | 2024-W1 | 2 | 3 |
| 4131 | 9 | 0 | 1/1/2024 | 1/10/2024 | 1/1/2024 | 1 | 2 | 1 | 2024-W2 | 2 | 3 |
| 7077 | 0 | 31 | 1/1/2024 | 1/1/2024 | 2/1/2024 | 1 | 1 | 5 | 2024-W3 | 1 | 3 |
| 339 | 0 | 31 | 1/1/2024 | 1/1/2024 | 2/1/2024 | 1 | 1 | 5 | 2024-W4 | 1 | 3 |
| 5777 | 0 | 31 | 1/1/2024 | 1/1/2024 | 2/1/2024 | 1 | 1 | 5 | 2024-W5 | 1 | 3 |