Forum Discussion

Jorgast's avatar
Jorgast
Resolver II
6 years ago
Solved

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

4 Replies