0
votes

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

1
Cumulative based on what index? What DAX code have you tried so far?Olly
This recent question and the other questions that are linked should give you a good start: stackoverflow.com/questions/55819431Alexis Olson

1 Answers

0
votes

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 ) )