Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago
Solved

Rolling Sum issue - help

Hi, can someone help me to calculate the Rolling Sum (the last column in the below example). I have Pro Id, Year-month, Total Bonus for each Year-month, and few other columns in the visual as shown b...
  • Jihwan_Kim's avatar
    Jihwan_Kim
    3 years ago

    Hi,

    Please try the below measure that I amended a little bit, and please check the attached file.

     

    Rolling sum measure: =
    IF (
        NOT ISBLANK ( [Total bonus measure:] ) && HASONEVALUE ( Data[Pro Id] ),
        CALCULATE (
            [Total bonus measure:],
            FILTER ( ALL ( Data ), Data[Pro Id] = MAX ( Data[Pro Id] ) ),
            'Calendar'[Date] <= MAX ( 'Calendar'[Date] )
        )
    )
    

     

  • Anonymous's avatar
    Anonymous
    3 years ago

    Ecellent. It worked. Thank you!

     

    Appreciated.