Forum Discussion
Adjusting Week Grouping Logic in Power BI Matrix Table
- 1 year ago
All of this is immutable. There is no need to calculate this with Power Query or DAX. Use an externally sourced calendar table that for each day indicated which week sub group it belongs to.
Thank you for the response!
To clarify my issue, here's some sample data that reflects the problem I'm encountering with my matrix table:
Rows: NAME
Columns: WeekPeriod
Values: Actual
Filtered by the month of October
| NAME | Week 1 Mon-Wed | Week 1 Thu-Sat | Week 2 Mon-Wed | Week 2 Thu-Sat | Week 3 Mon-Wed | Week 3 Thu-Sat |
| Brix | 1 | 1 | 1 | 1 | 1 | 1 |
| Zoey | 1 | 1 | 1 | 1 |
- October 2024 starts on a Tuesday, so the first column should be "Week 1 Thu-Sat" because the first three days of the week (Mon-Wed) don't form a complete group.
- Only display complete groups of Mon-Wed and Thu-Sat. For example, if a week only has a part of Mon-Wed or Thu-Sat that spills into the next month, it shouldn't be displayed in the header.
here's more sample filtered by the month of April:
| NAME | Week 1 Mon-Wed | Week 1 Thu-Sat | Week 2 Mon-Wed | Week 2 Thu-Sat | Week 3 Mon-Wed | Week 3 Thu-Sat | Week 4 Mon-Wed | Week 4 Thu-Sat | Week 5 Mon-Wed |
| Brix | 1 | 1 | 1 | 1 | 1 | 1 | 1 | 1 | |
| Zoey | 1 | 1 | 1 | 1 | 1 | 1 | 1 |
- this April table should only have 8 columns since the last group of Mon-Wed isn't complete April 29-30 as Monday and Tuesday, because Wed falls on the next month.
Please let me know if this helps or if you need further clarification. Thank you
All of this is immutable. There is no need to calculate this with Power Query or DAX. Use an externally sourced calendar table that for each day indicated which week sub group it belongs to.