Forum Discussion

NT2510's avatar
NT2510
Frequent Visitor
5 years ago
Solved

Running Total blanks

Hello,   I have a table with two dates: Close Date, Accounting Date, amount and Month column (Close Date - Accouning Date)+1. I want running total of Amount based on Months.  I used below measure b...
  • v-alq-msft's avatar
    v-alq-msft
    5 years ago

    Hi, NT2510 

     

    You may try modifying the measure as below to see if it works.

    RunningAmount2 = 
    var _max=CALCULATE(MAX(Sheet1[Mths]),ALLEXCEPT(Sheet1,Sheet1[Year]))
    var _min=MIN( MAX('Table'[Value]),_max)
    return
        CALCULATE(
            sum(Sheet1[Amount]),
                FILTER(
                    ALLSELECTED(Sheet1[Mths]),
                    'Sheet1'[Mths]<=_min
                )
        )

     

    Best Regards

    Allan

     

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.