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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Thigs
Helper IV
Helper IV

Calculated Column Running Total

Hi all, 

I've looked at several other posts answering similar questions but can't find exactly what I need. Basically, I have a column for Index (starting at 1), and a column for quantity of items. I want to do a running total of the quantity based on the Index column - but it needs to be in a calculated column rather than a measure as I need to use the column itsself for an additional analysis in a bit. I have tried the following, but it doesn't work - 

 

Cumulative Total =
CALCULATE (
SUM('Data'[QtyPicked]),
FILTER (
ALL( 'Data'[Index] ),
'Data'[Index] <= MAX ( 'Data'[Index] )
)
)
 
It seems to just be giving me the quantity, not the running quantity
 
I also tried something like this - 
Running Total = if('Data'[Index] = 1, 'Data'[QtyPicked],
CALCULATE(sum('Data'[QtyPicked]),
FILTER( 'Data'[Index] <= MAX('Data'[Index]))))
 
Which also gave crazy numbers, so no good either. 
1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @Thigs 

for a calculated column you can use 

Cumulative Total =
SUMX (
    FILTER ( 'Data', 'Data'[Index] <= EARLIER ( 'Data'[Index] ) ),
    'Data'[QtyPicked]
)

View solution in original post

1 REPLY 1
tamerj1
Super User
Super User

Hi @Thigs 

for a calculated column you can use 

Cumulative Total =
SUMX (
    FILTER ( 'Data', 'Data'[Index] <= EARLIER ( 'Data'[Index] ) ),
    'Data'[QtyPicked]
)

Helpful resources

Announcements
July PBI25 Carousel

Power BI Monthly Update - July 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.