Forum Discussion

jdugas's avatar
jdugas
Advocate I
9 years ago
Solved

Help with Running Total

I can't seem to figure out how to write DAX to calculate what's in column Running Balance. The Reserve Beginning Balance is what starts the calculation on a year basis and each month Reserve is added...
  • v-sihou-msft's avatar
    9 years ago

    jdugas

     

    I can't understand why the Running Balance for 3/1 is ($1,457,600.00). Based on your logic, it should be a cumulative sum for those two columns, you just need to create a YTD measure.

     

    Running Balance =
    CALCULATE (
        SUM ( Table1[Reserve Beginning Balance] ) + SUM ( Table1[Reserve] ),
        FILTER (
            ALL ( Table1 ),
            Table1[Date] <= MAX ( Table1[Date] )
                && Table1[Date] >= DATE ( YEAR ( MAX ( Table1[Date] ) ), 1, 1 )
        )
    )

     

     

    Regards,