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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
nranito
Helper II
Helper II

Cumulative sum by columns

I have a table REQ in which I want to count values each day and show in a graph the cumulative sum,

I used measure

 

Acumulate = CALCULATE(count(Reqs[ID]),FILTER(ALLSELECTED(Reqs),Reqs[DAY]<=MAX(Reqs[DAY] ) ))  

 

Now I need the same, CUMULATIVE sum per day, but group by a column

 

Any thoughts?

 

Thank you for any help

 

1 ACCEPTED SOLUTION
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @nranito,

 

 

Do you want to get a output like below? Calculate the cumulative sum of Sales per day and group by Type.

 

Capture.PNG

If it is, you could refer to this measure.

 

Measure 2 =
CALCULATE (
    SUM ( Table1[Sales] ),
    FILTER (
        ALLEXCEPT ( 'Table1', Table1[Type] ),
        'Table1'[Day] <= MAX ( 'Table1'[Day] )
    )
)

If not, please share your data sample which could reproduce your scenario and your desired output.

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
v-piga-msft
Resident Rockstar
Resident Rockstar

Hi @nranito,

 

 

Do you want to get a output like below? Calculate the cumulative sum of Sales per day and group by Type.

 

Capture.PNG

If it is, you could refer to this measure.

 

Measure 2 =
CALCULATE (
    SUM ( Table1[Sales] ),
    FILTER (
        ALLEXCEPT ( 'Table1', Table1[Type] ),
        'Table1'[Day] <= MAX ( 'Table1'[Day] )
    )
)

If not, please share your data sample which could reproduce your scenario and your desired output.

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

It's just that, thank you!

 

Can you explain what "allexcept" does? I tried, as you pointed, using GROUP BY, with no success...

Hi @nranito,

 

You could have a view of AllEXCEPT function which introduce how to use it in more details.

 

Best Regards,

Cherry

Community Support Team _ Cherry Gao
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.