Forum Discussion
Anonymous
5 years agoNot applicable
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...
- 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
v-deddai1-msft
Community Support
5 years agoHi 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