Forum Discussion
sjelting
3 years agoFrequent Visitor
Cumulative Sum over grouped by Column
Hello, i have a dataset looking like: date,category,amount 0,2,1 1,2,3 1,2,4 4,5,6 the amount should be summed up by category in a certain interval, so that it looks like this if date...
- 3 years ago
Hi sjelting
Please refer to attached sample file with the solutionMeasure = VAR CurrentAmount = SUM ( q[amount] ) RETURN SUMX ( FILTER ( ALLSELECTED ( q[category] ), CALCULATE ( SUM ( q[amount] ) ) <= CurrentAmount ), CALCULATE ( SUM ( q[amount] ) ) )