Forum Discussion

RenateBK's avatar
RenateBK
Helper II
3 years ago
Solved

Need help: Cumulative sum function only returns total

Hello,    Edit: Along with the solution I also identified another mistake I made. There was a mismatch between the formatting of my date table and the date column in my fact table (date/time vs dat...
  • BA_Pete's avatar
    3 years ago

    Hi Renate,

     

    Try this as a measure instead, making sure to use dDato fields in visuals, not fact table dates:

    _cumulativeSum =
    VAR __cDate = MAX(dDato[Date])
    RETURN
    CALCULATE(
        SUM(OversiktKurs[Deltagere kurs]),
        FILTER(
            ALLSELECTED(dDato),
            dDato[Date] <= __cDate
        )
    )

     

    Pete