Forum Discussion
J_Melton_TX
3 years agoFrequent Visitor
Average Daily Subscription over time period
I am searching for advice on a variation of the count-active-subscribers issue that has been otherwise well-addressed in this forum. I am looking for a way to count the average of daily active enro...
- 3 years ago
After significant trial and error - and some hints from the above posts, I was able to find a solution. It works out to be similar to the the "events in progress" dax pattern found here - Events in progress – DAX Patterns Thank you to anyone who helped.
Anonymous
3 years agoNot applicable
Hi J_Melton_TX ,
Please try like:
Total No of Active Enrollments by Date =
VAR Currentdate =
MAX ( date_DIM_enrollment_creation[Date] )
VAR Startdate =
MIN ( date_DIM_enrollment_creation[Date] )
VAR Days =
DATEDIFF ( Startdate, Currentdate, DAY )
VAR ActiveEnrollments =
CALCULATE (
COUNTROWS ( class_enrollment_FACT ),
ALL ( date_DIM_enrollment_creation ),
date_DIM_enrollment_creation[Date] <= Currentdate,
ISBLANK ( class_enrollment_FACT[drop_date] )
|| class_enrollment_FACT[drop_date] >= Startdate
)
VAR _Avg =
DIVIDE ( ActiveEnrollments, Days )
RETURN
_Avg
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