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
Anonymous
Not applicable

Evolution / Cumulative Sum

Been struggling with this one:

 

I need to show the evolution of notes that have been closed based on weeks:

 

help1.PNG

First week is null because it doesn't have an ending date, then I consider the note as open.

 

I mean, in the first column, week "13" the result should be: 2380, in week "14" the result should be "2272"... and it goes like this, decreasing until it gets to this date, wherein the result value should be 1715.

 

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

Hello @Anonymous 

You can calculate a running total then subtract that from your full total.

RT Notes = 
    VAR CurrentWeek = MAX ( Notes[Week] )
RETURN
    CALCULATE(
        SUM ( Notes[Notes] ),
        ALL ( Notes[Week] ),
        Notes[Week] <= CurrentWeek
    )

2019-08-04_RunningTotalNotes.jpg

View solution in original post

2 REPLIES 2
jdbuchanan71
Super User
Super User

Hello @Anonymous 

You can calculate a running total then subtract that from your full total.

RT Notes = 
    VAR CurrentWeek = MAX ( Notes[Week] )
RETURN
    CALCULATE(
        SUM ( Notes[Notes] ),
        ALL ( Notes[Week] ),
        Notes[Week] <= CurrentWeek
    )

2019-08-04_RunningTotalNotes.jpg

Anonymous
Not applicable

Can't seem to thank you enough!!!!!!

It worked perfectly.

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.