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

Cumulative column

If I have appended rows which, how do I get cumulative column but starting from new in each appended column?

The way I made this master table is by appending different projects and I use slicer to extract individual values. But I want to get a cumulative column for one column

 

 

Cumulative Actual Energy = CALCULATE(SUM(Absolute_Master_Table[Actual Energy]),ALL(Absolute_Master_Table),Absolute_Master_Table[Date] <= EARLIER(Absolute_Master_Table[Date]))

 

 

If I did this way it will find sum from the beginning of table, which is not correct. i want it to reset for each appended column so that I can get cumulative energy reading for each projects.

Please help!

@Anonymous 

4 REPLIES 4
Mahesh0016
Super User
Super User

Cumulative Actual Energy = CALCULATE(SUM(Absolute_Master_Table[Actual Energy]),ALL(Absolute_Master_Table),Absolute_Master_Table[Date] <= MAX(Absolute_Master_Table[Date]))

Try this formula if it is helpful for you kindly accept as a solution mark.
thank you!

Anonymous
Not applicable

Sorry, this doesn't work. It gives total sum and stores the same value in all rows.

Mahesh0016_0-1670931263821.png

See my result of DAX Its give me correct answer

Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but please try the below in order to create expected calcualted column. In my opinion, something like [project name] column has to be included when considering about conditions to add. 

 

 

 

Cumulative Actual Energy V2 CC =
SUMX (
    FILTER (
        Absolute_Master_Table,
        Absolute_Master_Table[Date] <= EARLIER ( Absolute_Master_Table[Date] )
            && Absolute_Master_Table[ProjectName]
                = EARLIER ( Absolute_Master_Table[ProjectName] )
    ),
    Absolute_Master_Table[Actual Energy]
)

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

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.