March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Early bird discount ends December 31.
Register NowBe one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now
hi! im new here, can someone pls help me with this? thank you!
i have a matrix table
rows: nr tagging[new region], customer[customer name]
columns: productivity[weekperiod]
values: productivity[actual]
currently this is the output of my columns in the table:
Wk - 1 Mon-Wed | Wk - 1 Thu-Sat | Wk -2 Mon-Wed | Wk -2 Thu-Sat
First column is always "Wk1 Mon-Wed", even if the first group of the first week of the month falls under the group of "Wk-1 Thu-Sat". How can I correct this? if week 1 starts on a tuesday or wednesday or thursday, then the first column should be Wk-1 Thu-Sat, if week 1 starts on a sat or sun or mon, then the first column should be Wk-1 Mon-Wed. The group should be complete (mon-wed) and (thu-sat). let’s say in the month of Sep 2024, week 5 is only until Monday, then there shouldn’t be Wk-5 Mon-Wed since Tues and Wed falls on the next month.
In June 2024, day 1 started on a Saturday, so the first column should be "Wk-1 Mon-Wed".
WeekPeriod = VAR WeekNum = “Wk - “ & Productivity[Week_5] VAR DayGroup = Productivity[Weekday Group] RETURN IF(ISBLANK(DayGroup), BLANK(), WeekNum & “ “ & DayGroup) Week_5 = VAR Num = INT ((Productivity[FORM ANSWER DATE] • [Day]-1)/7)+1 RETURN IF ( Num > 5, 5, Num )
Weekday Group = SWITCH ( TRUE () , Productivity [Weekday] >= 1 && Productivity[Weekday] <= 3, "Mon-Wed" , Productivity [Weekday] >= 4 && Productivity[Weekday], <= 6, "Thu-Sat", BLANK())
Solved! Go to Solution.
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.
Please provide sample data that covers your issue or question completely, in a usable format (not as a screenshot).
Do not include sensitive information. Do not include anything that is unrelated to the issue or question.
Need help uploading data? https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...
Please show the expected outcome based on the sample data you provided.
Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!