Forum Discussion
Anonymous
4 years agoNot applicable
Calculate average, count same group as 1
Hello everyone, In Power BI I need to make the calculations which you can see below. - I want to know the average from column A, B and C seperate. - Each company counts as one. Company x has...
- 4 years ago
Hi Anonymous
Try this code for each column, for instance for column A:
Avr. A = VAR _A = SUMMARIZE( 'Table', 'Table'[Company Name], "Avr.", AVERAGE( 'Table'[A] ) ) RETURN AVERAGEX( _A, [Avr.] )Output:
Avr. B = VAR _A = SUMMARIZE( 'Table', 'Table'[Company Name], "Avr.", AVERAGE( 'Table'[B] ) ) RETURN AVERAGEX( _A, [Avr.] )Avr. C = VAR _A = SUMMARIZE( 'Table', 'Table'[Company Name], "Avr.", AVERAGE( 'Table'[C] ) ) RETURN AVERAGEX( _A, [Avr.] )If this post helps, please consider accepting it as the solution to help the other members find it more quickly.
Appreciate your Kudos!!
LinkedIn: www.linkedin.com/in/vahid-dm/
bcdobbs
Community Champion
4 years agoWould definently unpivot it then. Let me know if you need more detail on that. Happy to help.