Forum Discussion

Marcin's avatar
Marcin
Helper V
9 years ago
Solved

Running total in time

Hi,   I need to get chart with runnig total hours reported in project by weekt time , I am using this  DAX formula :   CumulativeHours = CALCULATE ( SUM ( Events[HoursRound] ), FILTER ( ALL ( ...
  • Anonymous's avatar
    Anonymous
    9 years ago

    Here is my theory:

     

    CumulativeHours =
    VAR LastEvent = LASTNONBLANK ( Time[Week], CALCULATE ( SUM ( Events[HoursRound] ) ) )
    RETURN
      CALCULATE (
        SUM ( Events[HoursRound] ),
        FILTER ( ALL ( 'Time'[Week] ), 'Time'[Week] <= MAX ( 'Time'[Week] ) && 'Time'[Week] <= LastEvent)
       )