Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
Bluemoon07
Frequent Visitor

Cumulative Sum without repeat value

Hello PowerBi communauty, 

I did a measure DAX to cumulative sum, but when I created a plot scatter it looks like I have all "price" again at the end of the visual. I have double plots..Can you help me? How can I show my dot (price) based on cumulative Axis-X without repeat value at the end ? 

Bluemoon07_0-1756389420121.png

 

CALCULATE (
[Volume],
FILTER (
    ALLSELECTED ('Sheet'),
         'Sheet'[price]
            >= MAX ('Sheet'[price])
))
1 ACCEPTED SOLUTION
djurecicK2
Super User
Super User

Hi @Bluemoon07 ,

 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

 

View solution in original post

8 REPLIES 8
Shahid12523
Community Champion
Community Champion

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.

Shahed Shaikh

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.

Shahed Shaikh

Yes, I alrealdy did it. But it shows that..like the original issue...

Bluemoon07_0-1756456064381.png

 

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 ? 

Bluemoon07_0-1756453937569.png

 

djurecicK2
Super User
Super User

Hi @Bluemoon07 ,

 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

 

FBergamaschi
Solution Sage
Solution Sage

Please turn the visual into a table and look at the values calculated through your measure, are they ok or not?

 

We shall go back to this visual once we are sure numbers are correct

 

Best

 

If this helped, please consider giving kudos and mark as a solution

@me in replies or I'll lose your thread

Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page

Consider voting this Power BI idea

Francesco Bergamaschi

MBA, M.Eng, M.Econ, Professor of BI

Hello @FBergamaschi, yes they are correct

Ok so the calculation is correct

 

I am not sure the scatter plot is the right chart but on that I cannot help on why you get those weird stuff, is this the only graph you can use?

 

If this helped, please consider giving kudos and mark as a solution

@me in replies or I'll lose your thread

Want to check your DAX skills? Answer my biweekly DAX challenges on the kubisco Linkedin page

Consider voting this Power BI idea

Francesco Bergamaschi

MBA, M.Eng, M.Econ, Professor of BI

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

Top Solution Authors
Top Kudoed Authors