Forum Discussion

CEllis's avatar
CEllis
Resolver I
1 year ago
Solved

Matrix - Reset Cumulation

I've been restling with this for a few days now and cant seem to get it right.   I am using a dax statment to provide a cummulation figure in a matrix that works.   CALCULATE(SUM('Attendance (Ta...
  • AlexisOlson's avatar
    1 year ago

    I don't fully understand what you're trying to do but you could try using MOD.

    VAR _Present =
        CALCULATE (
            SUM ( 'Attendance (Table)'[Present] ),
            FILTER (
                ALL ( 'Academic Year (Table)' ),
                'Academic Year (Table)'[Week Ending]
                    <= MAX ( 'Academic Year (Table)'[Week Ending] )
            )
        )
    RETURN
        MOD ( _Present, 21 )