Forum Discussion
Cumulative Sum without repeat value
- 11 months ago
Hi Anonymous ,
In addition to what FBergamaschi said, you could try using a visual calculation with RUNNINGSUM. Here is additional information:
https://www.youtube.com/watch?v=pqfBH0ZmYkA
Your scatter plot shows duplicate dots because your DAX measure is summing all [Volume] again at the end due to how MAX(price) behaves in that context.
Fix it with this cleaner logic:
CumulativeVolume =
VAR CurrentPrice = SELECTEDVALUE('Sheet'[price])
RETURN
SUMX (
FILTER (
ALLSELECTED('Sheet'),
'Sheet'[price] <= CurrentPrice
),
[Volume]
)
This ensures each dot reflects cumulative volume up to its own price—no repeats at the end.
Hello Shahid12523, your answer is correct, it does an ascending order. But I would like a descending order when I modify your DAX code I back to the same issue...any tips ?