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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Average number of users across different sites

Hello,

 

I'm trying to create a column or measure that will show the average number of users across 3 different websites. Currently, my data looks like this:

 

SiteDateUser Identifier
random.com01/05/2021582
random.com01/05/2021583
random.com01/05/2021584
random.com02/05/2021586
cats.com03/05/2021587
cats.com04/05/2021588
dogs.com05/05/2021589
dogs.com05/05/2021590

 

My current measure is

 

 

Average users = DIVIDE(DISTINCTCOUNT(Table[User Identifier]),CALCULATE(DISTINCTCOUNT(Table[Date]), ALL(Table)))

 

 

This measure actually works but because not all three sites have been rolled out on the same day, if I filter by one of the sites that rolled out later in the year, I get a daily average user number lower than 1, which is technically not possible.  My initial instinct was to create a number of days column using

 

Number of Days = RANKX(Table, Table[Date],,ASC,Dense)

 

This creates a new column with numbers as days. So, for the above example, the first three rows would be 1, followed by 2,3,4 and the last two rows would be 5. But I cannot filter this calculation with different sites as RANKX doesn't allow using filters.

 

Any ideas, how can I overcome this?

 

Thanks,

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@Anonymous , Try a new measure like

averageX(summarize(Table, Table[Site], Table[Date], "_1",DISTINCTCOUNT(Table[User Identifier])),[_1])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , Try a new measure like

averageX(summarize(Table, Table[Site], Table[Date], "_1",DISTINCTCOUNT(Table[User Identifier])),[_1])

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors