Forum Discussion
Vytautas
5 years agoFrequent Visitor
Calculate active users based for specific date
Hello, I have a table of users with their IDs, startdate, enddate, locationID. If user is still active - End date is date of today. I need to calculate daily, monthly and yearly number of activ...
- 5 years ago
Hi, Vytautas
create a measure like this:
_Active users = CALCULATE ( DISTINCTCOUNT ( Active_users[id] ), FILTER ( Active_users, [start] <= MAX ( 'D_TimeDim'[Date] ) && [end_date] >= MAX ( 'D_TimeDim'[Date] ) ) )The total will show the number of active users on the last day of the month.
Hope this helps.
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
v-angzheng-msft
Community Support
5 years agoHi, Vytautas
create a measure like this:
_Active users =
CALCULATE (
DISTINCTCOUNT ( Active_users[id] ),
FILTER (
Active_users,
[start] <= MAX ( 'D_TimeDim'[Date] )
&& [end_date] >= MAX ( 'D_TimeDim'[Date] )
)
)
The total will show the number of active users on the last day of the month.
Hope this helps.
Best Regards,
Community Support Team _ Zeon Zheng
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.