cancel
Showing results for
Did you mean:

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a \$100 discount. Register Now

Helper II

## average distinct users per month

I have a table that contains information on users accessing a webpage.

I'm using the following measure to get unique users per day (this is used for the line chart and is correct).

``````count_of_customer =
COUNTROWS (
SUMMARIZE ( 'cr20b_commscampusauditlogs3', 'cr20b_commscampusauditlogs3'[UserId], 'cr20b_commscampusauditlogs3'[CreationTime].[Date])
)``````

I'd also like to include a table that has the monthly average.

I have tried creating a second measure but using [CreationTime].[Month] instad of Day. This is in the table on the right, showing 622 users.  But the value is clearly wrong, as the max unique users per day is around 340.

Can anyone suggest what I have done wrong?

1 ACCEPTED SOLUTION
Resolver II

@nick9one1 ,  Create a Date table and join the Date (Without time) with Date of date table and create a measure given below

Avg of Month =
calculate(
Averagex(Values('Date'[Year Month]) , calculate(
COUNTROWS (
SUMMARIZE ( 'cr20b_commscampusauditlogs3', 'cr20b_commscampusauditlogs3'[UserId], 'Date'[Date])
))), removefilters('date'))

Resolver II

@nick9one1 ,  Create a Date table and join the Date (Without time) with Date of date table and create a measure given below

Avg of Month =
calculate(
Averagex(Values('Date'[Year Month]) , calculate(
COUNTROWS (
SUMMARIZE ( 'cr20b_commscampusauditlogs3', 'cr20b_commscampusauditlogs3'[UserId], 'Date'[Date])
))), removefilters('date'))

Announcements

#### Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

#### Power BI Monthly Update - February 2024

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

#### Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

#### Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors
Top Kudoed Authors