Forum Discussion
Total Employee Count by group
- 4 years ago
nleuck_101
Please try this measureCount Measure = VAR T1 = SUMMARIZE ( TableName, TableName[Level], "@Count", SUMX ( VALUES ( TableName[Count] ), TableName[Count] ) ) RETURN SUMX ( T1, [@Count] )
There is still a problem. If I'm only getting the MAX it's not summing the levels that might have different values. Example level 10 could have 100, 100, 100, 90, 70. What I would want is for it to sum 100 + 90 +70 and show level 10 as 260 and not the max of 100.
nleuck_101
Would like to connect via teams or zoom to look into it as I believe I'm missing something here
- tamerj14 years ago
Community Champion
nleuck_101
Please try this measureCount Measure = VAR T1 = SUMMARIZE ( TableName, TableName[Level], "@Count", SUMX ( VALUES ( TableName[Count] ), TableName[Count] ) ) RETURN SUMX ( T1, [@Count] ) - nleuck_1014 years ago
Continued Contributor
tamerj1
Thank you! This solution worked as expected. - nleuck_1014 years ago
Continued Contributor
I need to get the sum of the employee in the level. If you look at the original post level 10 has 3 rows. That's because there were two terminations reasons (I messed up and one of those needs to be a different reason like new employer or etc...). I want to get the total employee count of level 10 which is 100 but Power BI is summing up 100 three times becasue there are three entries and I'm getting 300 which is wrong.
- tamerj14 years ago
Community Champion
nleuck_101
And this is a calculated tableCount Measure = VAR T1 = SUMMARIZE ( TableName, TableName[Level], "@Count", SUMX ( VALUES ( TableName[Count] ), TableName[Count] ) ) RETURN ADDCOLUMNS ( T1, "% Count", DIVIDE ( [@Count], SUMX ( T1, [@Count] ) ) )