Forum Discussion

JMass22's avatar
JMass22
Frequent Visitor
6 years ago
Solved

Cumulative Running Total

I am trying to calculate a cumulative total of [payments], but I want it to sum in ascending order of [day]. All solutions I have found start the running total with the largest payments down to the s...
  • Greg_Deckler's avatar
    6 years ago

    Cumulative Total Column = 

      VAR __Day = 'Table'[Day]

    RETURN

      SUMX(FILTER('Table',[Day] <= __Day),[Payment])

     

    Cumulative Total Measure = 

      VAR __Day = MAX('Table'[Day])

    RETURN

      SUMX(FILTER(ALL('Table'),[Day] <= __Day),[Payment])