Forum Discussion

kc_'s avatar
kc_
Icon for Helper I rankHelper I
2 years ago
Solved

Running / Cumulative Total Resetting Each Month

Hello All  I would like to create a measure that calculates a running total which resets at the beginning of each month.   I am using the following DAX however as you will see it is summing up v...
  • bhanu_gautam's avatar
    2 years ago

    kc_ , Try using below DAX

     

    RunningTotal =
    CALCULATE(
    SUM('YourTable'[YourColumn]),
    FILTER(
    ALL('YourTable'),
    'YourTable'[Date] <= MAX('YourTable'[Date]) &&
    MONTH('YourTable'[Date]) = MONTH(MAX('YourTable'[Date])) &&
    YEAR('YourTable'[Date]) = YEAR(MAX('YourTable'[Date]))
    )
    )