Forum Discussion

mp390988's avatar
mp390988
Icon for Post Partisan rankPost Partisan
1 year ago
Solved

Networkdays issue when totalling for Year level

Hi,   I have this calculated column in my dim date that displays the networkday for that particular month.     I am running into issues when I create the following matrix visual, as you ca...
  • saritasw's avatar
    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.