Forum Discussion

AlbLS's avatar
AlbLS
Frequent Visitor
7 years ago
Solved

Running Total per Month from a Measure

Hello everyone, I am new to the Power BI community. Thank you in advance for your help. I have a problem with a cummulative calculation from a measure. This calculation works perfectly for the year...
  • Mariusz's avatar
    7 years ago

    Hi AlbLS 

    I've simplified this for you, hope its what you need.

    # Entries = COUNTROWS( Entries ) 
    # Departures = COUNTROWS( Departures )
    # Difference = [# Entries] - [# Departures]
    # Difference Running Total = 
    IF( 
        NOT ISEMPTY( Departures ) || NOT ISEMPTY( Entries ),
        CALCULATE(
            [# Difference],
            FILTER(
                ALL( 'Date' ),
                'Date'[Date] <= MAX( 'Date'[Date] )
            )
        )
    )
    Best Regards,
    Mariusz

    If this post helps, then please consider Accepting it as the solution.

    Please feel free to connect with me.
    Mariusz Repczynski