0

I am working on a project, where a column needs cumulative summing. How do I find the cumulative sum for a column and store in another column.?

I expect the output as shown:

columnar image suggesting the query and output required

Olly
  • 7,749
  • 1
  • 19
  • 38
  • 1
    Cumulative based on what index? What DAX code have you tried so far? – Olly Apr 25 '19 at 16:55
  • This recent question and the other questions that are linked should give you a good start: https://stackoverflow.com/questions/55819431/ – Alexis Olson Apr 25 '19 at 17:50

1 Answers1

0

Assuming you have a date table and are using that to calculate you running total; you could follow the DAX pattern provided below or just amend it to fit your needs:

CumSum :=
VAR MaxDate =
    MAX ( 'Date'[Date] )
RETURN
    CALCULATE ( SUM ( 'Table'[A] ), 'Date'[Date] <= Maxdate, ALL ( date ) )
StelioK
  • 1,771
  • 1
  • 11
  • 21