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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Top Solution Authors