Forum Discussion

jetsger's avatar
jetsger
New Member
2 years ago
Solved

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 ...
  • rajendraongole1's avatar
    2 years ago

    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