Forum Discussion
Average by Category
Hi,
I am trying to calculate the average by categroy however, my numbers are not adding up.
AVERAGE =
Hi Anonymous ,
Try formula like below:
M_ = VAR count_category = COUNTROWS ( ALLEXCEPT ( 'Table', 'Table'[Category] ) ) VAR sum_ = CALCULATE ( SUM ( 'Table'[Value] ), ALL ( 'Table' ) ) RETURN DIVIDE ( sum_, count_category, BLANK () )If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
5 Replies
- keshavagrawal27
Resolver I
Hello Anonymous ,
You can use group by to fulfil your requirement.
Please mark it as a solution if was helpful.
Regards,
Keshav Agrawal
- AnonymousNot applicable
Hi,
I would just like to average for one chart and not change all my data. When I used the group by in "Transfrom" it changed all my data
- keshavagrawal27
Resolver I
Try with Dax
- Yossarian
Helper I
Hey,
Why not just use the average function?
Put it in a table visual with category and the measure - average(Table[category]) - v-henryk-mstf
Community Support
Hi Anonymous ,
Try formula like below:
M_ = VAR count_category = COUNTROWS ( ALLEXCEPT ( 'Table', 'Table'[Category] ) ) VAR sum_ = CALCULATE ( SUM ( 'Table'[Value] ), ALL ( 'Table' ) ) RETURN DIVIDE ( sum_, count_category, BLANK () )If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.
Best Regards,
Henry
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.