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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Jorgast
Resolver II
Resolver II

Annual Average based on Distinct Count

Hi-Power BI community,

 

I need your help. I am trying to look at the average number of people I had for 2019. So far, I was able to get the Distinct Count of their ID by day. When I compare the Averagex vs just doing a distinct count I get the same answer. I have also tried creating a summary table and used just the Date, State of Employment and ID but that gives me different daily numbers. I know I missing something in my measure but I'm not sure what it is.

 

Thanks in advanced

 

(Measure) Avg Headcount = averagex(TABLE, DISTINCTCOUNT(TABLE [ID])).

Calc Table = SUMMARIZE(TABLE, Dates[Date], Employee [State],

"Distinct", DISTINCTCOUNT(TABLE [ID]))

 

Desired Results

 

Monthly Average Headcount

Jan-19

338.615

Feb-19

323.625

Average both months

331.42

 

Data Sample

DateHeadcount

2-Jan380
3-Jan384
4-Jan387
5-Jan70
7-Jan403
8-Jan411
9-Jan410
10-Jan390
11-Jan385
12-Jan89
14-Jan363
15-Jan372
16-Jan395
17-Jan387
18-Jan400
19-Jan59
21-Jan375
22-Jan395
23-Jan399
24-Jan390
25-Jan392
26-Jan49
28-Jan367
29-Jan375
30-Jan386
31-Jan391
1-Feb375
2-Feb55
4-Feb368
5-Feb402
6-Feb388
7-Feb381
8-Feb366
9-Feb47
11-Feb366
12-Feb396
13-Feb384
14-Feb354
15-Feb339
16-Feb46
18-Feb358
19-Feb412
20-Feb409
21-Feb361
22-Feb384
23-Feb49
25-Feb382
26-Feb392
27-Feb374
28-Feb379
1 ACCEPTED SOLUTION
v-chuncz-msft
Community Support
Community Support

@Jorgast 

 

You may refer to the following posts.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-chuncz-msft
Community Support
Community Support

@Jorgast 

 

You may refer to the following posts.

Community Support Team _ Sam Zha
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
vanessafvg
Super User
Super User

is this what you looking for?Capture.PNG





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




@vanessafvg 

Yes

Doing an average of a distinct count is not working for me. What i want to do is get the average count for the year. 

ok unless im missing something, would this not work for you?  

 

 

avg of headcount 2 = AVERAGE(headount[Headcount])

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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