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

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

Reply
NI
New Member

Running Total by date based on value in another column

I want a running total by date for the Amount Column which should be different for each Security ID.Capture.PNG

 

2 ACCEPTED SOLUTIONS
Zubair_Muhammad
Community Champion
Community Champion

Hi @NI

 

First add an Index Column from Query Editor or Power Query

 

6500.png

View solution in original post

@NI

 

Now you can get the expected Cumulative  Values using this Calculated Column

 

Cumulative =
CALCULATE (
    SUM ( TableName[Amount] ),
    FILTER (
        ALLEXCEPT ( TableName, TableName[Security ID] ),
        TableName[Index] <= EARLIER ( TableName[Index] )
    )
)

View solution in original post

4 REPLIES 4
Zubair_Muhammad
Community Champion
Community Champion

Hi @NI

 

First add an Index Column from Query Editor or Power Query

 

6500.png

@NI

 

Now you can get the expected Cumulative  Values using this Calculated Column

 

Cumulative =
CALCULATE (
    SUM ( TableName[Amount] ),
    FILTER (
        ALLEXCEPT ( TableName, TableName[Security ID] ),
        TableName[Index] <= EARLIER ( TableName[Index] )
    )
)

hi @Zubair_Muhammad 

I have a follow up qustion about your amazing explanation, 

let's assume I have another "Country" column at the table, which I want to take as a paramater while calculating the running total, so that the cumulative total column will show not only cumulative total over time by securtiy Id but also by country, like in the example below- how should I revise the calculation in order to do so? 

 

Thanks ! 

 

Test.PNG

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.