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
jetsger
New Member

Running Total with Multiple Parameters

I've tried a few of the standard methods for running totals, though I have multiple pieces of data on the same date that I need to account for individually - 

 

The following did not work, nor did the creation of an index to accomplish a similar goal

SOY running total in Arrival =
CALCULATE(
    SUM('Full Data'[X]),
    FILTER(
        ALLSELECTED('Full Data'[Arrival]),
        ISONORAFTER('Full Data'[Arrival], MAX('Full Data'[Arrival]), DESC)
    )
)
 
Id like to be able to see a running total for the following matrix where after each vessel listed, a running total would sum the 3 columns of data and add to the prior row.

 

IE a column in row 1 would read 30,000, row 2 would read 60,000, row 3 would read 90,000, row 4 would read 

 
jetsger_2-1722570024632.png

Not sure if i am able or how to adjust the formula to appropriately see a running total that would reset with each change in port.

 

Thank you!

1 ACCEPTED SOLUTION
rajendraongole1
Super User
Super User

Hi @jetsger - Create a below measure that will calculate a running total that resets for each port.

Running Total =
VAR CurrentPort = MAX('Full Data'[Port])
VAR CurrentArrival = MAX('Full Data'[Arrival])
VAR CurrentVessel = MAX('Full Data'[Vessel])
RETURN
CALCULATE(
SUM('Full Data'[DataColumn1]) + SUM('Full Data'[DataColumn2]) + SUM('Full Data'[DataColumn3]),
FILTER(
ALL('Full Data'),
'Full Data'[Port] = CurrentPort &&
'Full Data'[Arrival] <= CurrentArrival &&
'Full Data'[Vessel] <= CurrentVessel
)
)

 

Hope it helps





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





View solution in original post

2 REPLIES 2
jetsger
New Member

Thank you for your help - this is fantastic!

rajendraongole1
Super User
Super User

Hi @jetsger - Create a below measure that will calculate a running total that resets for each port.

Running Total =
VAR CurrentPort = MAX('Full Data'[Port])
VAR CurrentArrival = MAX('Full Data'[Arrival])
VAR CurrentVessel = MAX('Full Data'[Vessel])
RETURN
CALCULATE(
SUM('Full Data'[DataColumn1]) + SUM('Full Data'[DataColumn2]) + SUM('Full Data'[DataColumn3]),
FILTER(
ALL('Full Data'),
'Full Data'[Port] = CurrentPort &&
'Full Data'[Arrival] <= CurrentArrival &&
'Full Data'[Vessel] <= CurrentVessel
)
)

 

Hope it helps





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





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.