Forum Discussion
Anonymous
6 years agoNot applicable
Count IDs with higher than average SUM
I want to count the number of IDs that have a sum greater than the average sum per ID and plot it over time on a line graph.
I am unsure of what the best way to formulate the DAX for this is.
Any suggestions?
Anonymous try following measure and use final measure in your visual
Sum Total = SUM ( 'Table'[Sum] ) Sum Avg = CALCULATE ( AVERAGE( 'Table'[Sum] ), ALL( 'Table'[ID] ) ) Id Count above Avg = COUNTX ( VALUES( 'Table'[ID] ), IF ( [Sum Total] > [Sum Avg], 1 ) )
5 Replies
- parry2k
Super User
Anonymous can you pbix with sample data and will get you the solution.
- AnonymousNot applicable
Count ID Sum 1 00031 17 1 00034 23 1 00037 36 1 00038 13 1 00040 12 1 00042 1 1 00046 5 1 00047 13 1 00018 47 - parry2k
Super User
Anonymous this sample data will not result anything because you have single record for each id, sum and avg will return the same number