Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago
Solved

Cumulative sum that resets every year

Hi,  I guess my question is simple, I want a cummlative sum that resets every year. I went through almost all the threads here and tried the formulas with no luck. Here is a sample of my data. The f...
  • v-xuding-msft's avatar
    6 years ago

    Hi Anonymous ,

    I create a sample. Please have a try to check if it is what you want.

    • Create a year column
    Year = YEAR('Table'[Date])
    •  Create a measure
    Measure =
    CALCULATE (
        SUM ( 'Table'[Approved] ),
        FILTER (
            ALL ( 'Table' ),
            'Table'[Date] <= MAX ( 'Table'[Date] )
                && 'Table'[Year] = MAX ( 'Table'[Year] )
        )
    )