Forum Discussion

bmjacques's avatar
bmjacques
Frequent Visitor
2 years ago
Solved

Cumulative Total by Weeks

I am trying to create a measure to calculate cumulative registrations by weeks before an event takes place. I have a data set with 15 years of meeting registration data that includes the date a perso...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi bmjacques 

     

    For your question, here is the method I provided:

     

    Here's some dummy data

     

    "Table"

     

     

    Create measures.

     

    Total = 
    CALCULATE(
        COUNTROWS('Table'),
        FILTER(
            ALL('Table'),
            'Table'[Meeting Name] = MAX('Table'[Meeting Name])
            &&
            'Table'[Weeks Registered] = MAX('Table'[Weeks Registered])
        )
    )

     

    Cumulative = 
    SUMX(
        FILTER(
            ALL('Table'),
            'Table'[Meeting Name] = MAX('Table'[Meeting Name])
            &&
            'Table'[Days Registered] <= MAX('Table'[Days Registered])
        ),
        'Table'[Total]
    )

     

    Here is the result.

     

     

    Regards,

    Nono Chen

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