Forum Discussion
Cumulative Sum without date column
I have a table like this below. Age, Type and Qty are column from file and Cumm Sum is the required column using DAX.
I want Cumm Sum column which will have cumulative sum. Please help me to write DAX to get Cumm Sum column from above example. Thanks in advance,
Rajesh S Hegde
Hi Anonymous
take a look at the following solution:
Running Total = CALCULATE( SUM('Table'[Qty]), FILTER( ALLEXCEPT('Table','Table'[Type]), MAX('Table'[Age (in M)]) >= 'Table'[Age (in M)] ) )With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)
3 Replies
- FrankATCommunity Champion
Hi Anonymous
take a look at the following solution:
Running Total = CALCULATE( SUM('Table'[Qty]), FILTER( ALLEXCEPT('Table','Table'[Type]), MAX('Table'[Age (in M)]) >= 'Table'[Age (in M)] ) )With kind regards from the town where the legend of the 'Pied Piper of Hamelin' is at home
FrankAT (Proud to be a Datanaut)- AnonymousNot applicable
- PaulDBrownCommunity Champion
Anonymous
What criterium establishes the cumulative values? Is it the Qty? Is it the "Age" column? If so, from max to min or viceversa?
In other words, what establishes the order for the cumulative values?
PS: it would be very helpful if you included the data in a table of actual values (not an image) so we can simply copy and paste to work on...