Forum Discussion
Networkdays issue when totalling for Year level
- 1 year ago
Hi mp390988 ,
Thanks for sharing the screenshots.Your DAX calculated column WorkingDaysPerMonth is correctly computing working days per month, but since it's a calculated column in the date table, using MAX(WorkingDaysPerMonth) in your matrix causes the year-level total to just show the max of the months (23), not the sum.
You want the year-level total to be the sum of working days for the visible months (Jan to Mar), which should be:
23 (Jan) + 20 (Feb) + 21 (Mar) = 64
In my opinion, You should create a measure, not rely on the calculated column in the matrix.
DAX Measure:
TotalWorkingDays =
SUMX(
VALUES('dim Date'[MonthNum]),
MAX('dim Date'[WorkingDaysPerMonth])
)
Try it.
Hi mp390988 ,
Thanks for sharing the screenshots.
Your DAX calculated column WorkingDaysPerMonth is correctly computing working days per month, but since it's a calculated column in the date table, using MAX(WorkingDaysPerMonth) in your matrix causes the year-level total to just show the max of the months (23), not the sum.
You want the year-level total to be the sum of working days for the visible months (Jan to Mar), which should be:
23 (Jan) + 20 (Feb) + 21 (Mar) = 64
In my opinion, You should create a measure, not rely on the calculated column in the matrix.
DAX Measure:
TotalWorkingDays =
SUMX(
VALUES('dim Date'[MonthNum]),
MAX('dim Date'[WorkingDaysPerMonth])
)
Try it.