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.
CumulativeVolumeDescending =
VAR CurrentPrice = SELECTEDVALUE('Sheet'[price])
RETURN
SUMX (
FILTER (
ALLSELECTED('Sheet'),
'Sheet'[price] >= CurrentPrice
),
[Volume]
)
use this
Instead of <= CurrentPrice, we use >= CurrentPrice to accumulate volumes from higher prices down to the current one.
- Anonymous11 months agoNot applicable
Yes, I alrealdy did it. But it shows that..like the original issue...