Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
5 years ago
Solved

Calculate Enrollment For Each Date - DAX Measure

Hello,    I am new to PowerBI and need some help.    I am looking to calculate and graph the number of club members on each date of the year.    The data is structured like this:   memberi...
  • v-deddai1-msft's avatar
    5 years ago

    Hi Anonymous ,

     

    I suggest you create a calendar table:

     

     

    Date = CALENDAR(DATE(2020,1,1),DATE(2020,12,31))

     

     

    Then use the following measure to calculate the enrollment/membership counts for each day of the year.

     

     

    enrollment/membership counts = CALCULATE(COUNT('Table'[memberid]),FILTER(ALL('Table'),'Table'[entrydate]<=MAX('Date'[Date])&&IF(ISBLANK('Table'[withdrawaldate]),1,'Table'[withdrawaldate]>=MAX('Date'[Date]))))

     

     

     

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

     

    Best Regards,

    Dedmon Dai