Forum Discussion

Gaspa25's avatar
Gaspa25
Regular Visitor
1 year ago
Solved

Cumulative sum dynamic

Hi everyone,  I am trying to create a measure that calculates the cumulative sum of a column, I want the cumulative sum to update based on the selected months in my slicer, meaning I want my graph t...
  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi Gaspa25 ,

     

    I missed something in my formulas. Please use these:

     

    2023 YTD = CALCULATE(SUM('RentalAgreement List'[Total R.A]),FILTER(ALLSELECTED('RentalAgreement List'),[sort]<=MAX('Month'[SORT])&&YEAR([Date])=2023))
    2024 YTD = CALCULATE(SUM('RentalAgreement List'[Total R.A]),FILTER(ALLSELECTED('RentalAgreement List'),[sort]<=MAX('Month'[SORT])&&YEAR([Date])=2024))

    Here's the result:

    Best Regards,

    Stephen Tao

     

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