Forum Discussion

GunnerJ's avatar
GunnerJ
Icon for Post Patron rankPost Patron
2 years ago
Solved

Cumulative Sum considering start and end dates

I'm trying to show the growth of our customer base and can pretty easily get the cumulative count based on connect date but realized that it's showing the all time connection and not who was active a...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Hi GunnerJ ,

    Check if this is your expected output:

     

    Cumulative Accts = 
    VAR max_date = MAX('Date Table'[Date])
    RETURN
        CALCULATE(
            COUNT('Elec Service All Time'[BI_ACCT]),
                'Elec Service All Time'[BI_CON_DT] <= max_date
                && 'Elec Service All Time'[BI_DISC_DT] > max_date
        )
    

     

    Best Regards,
    Gao

    Community Support Team

     

    If there is any post helps, then please consider Accept it as the solution  to help the other members find it more quickly.
    If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!

    How to get your questions answered quickly --  How to provide sample data in the Power BI Forum