Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
sguenther
Advocate II
Advocate II

How to calculate Sum of Daily Active Users?

Hey guys,

 

quick DAX question. I have two tables, one table with users (two columns: users[id], users[name]) and another table with actions (actions[date], actions[user_id]). Besides that I have a calendar table.

 

Now I want to calculate the number of "active users", meaning the number of users who are active per time frame. That's pretty easy via:

 

Active Users = 
CALCULATE(
	COUNTROWS(users),
	FILTER(users,
		CALCULATE(
			COUNTROWS(actions), 
			FILTER(ALL(actions), 
				actions[user_id] = users[id] &&
				actions[date] >= MIN(calendar[Date]) &&
				actions[date] <= MAX(calendar[Date])
			)
		) > 0
	)
)

But if I want to calculate the number of "Daily Active Users" per time frame, meaning the Sum over the number of days one user is active per time frame over all users, I don't have any clue how to do that in a measure without creating an extra Crossjoin table between the users table and the calendar.

 

Any clues?

 

Thank you,

Sebastian

1 ACCEPTED SOLUTION
BhaveshPatel
Community Champion
Community Champion

Daily active = SUMX(Calenders,Calenders[Active Users])

 

I have kept your original measure as it is and created a iteration over the calender table which will give you the desired result.

Sum of Daily active users.

 

Hope this will solve your problem. 

 

 

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

View solution in original post

3 REPLIES 3
BhaveshPatel
Community Champion
Community Champion

Daily active = SUMX(Calenders,Calenders[Active Users])

 

I have kept your original measure as it is and created a iteration over the calender table which will give you the desired result.

Sum of Daily active users.

 

Hope this will solve your problem. 

 

 

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.
BhaveshPatel
Community Champion
Community Champion

can provide you the exact solution if get a snapshot of data.

Thanks & Regards,
Bhavesh

Love the Self Service BI.
Please use the 'Mark as answer' link to mark a post that answers your question. If you find a reply helpful, please remember to give Kudos.

@BhaveshPatel Sure. I created a test sample. Here you go

 

Test.pbix

 

Thank you!

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

Find out what's new and trending in the Fabric Community.