Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
bsz412
Helper III
Helper III

calculate average of category averages

Hello, 

 

 I would like to create calculated columns:

- averages per category (per supplier per country and per etim class) - this I can calculate.

- Where I got stuck is how to calculate the average of those values above, taken every supplier, country and etim class combination only once.

 

Example: 

supplier_avg_co2_total: e.g for ABB, for MCB in France: (8+2+9+28)/4 - I can calculate this.

ETIM_country_avg: 

that would show the average of supplier’s averages. In the example below  for France and MCB: (11.75+6.67+14.16)/3

 

bsz412_0-1656331650318.png

 

thank you!

 

1 ACCEPTED SOLUTION

This DAX works: 

 

CALCULATE(
AVERAGEX(
SUMMARIZE('table', 'table'[Country],'table'[ETIM Class],'table'[supplier_avg_CO2_total]),'table'[supplier_avg_CO2_total]
),
ALLEXCEPT('table','table'[Country],'table'[ETIM Class])
)

View solution in original post

3 REPLIES 3
amitchandak
Super User
Super User

@bsz412 ,  Try a measure like

 

AverageX(Summarize(Table, Table[Country], Table[ETIM_country]), calculate([Suppier_Avg_col2_total], allexcept(Table, Table[Country], Table[ETIM_country])))

 

 

in case Suppier_Avg_col2_total is a column

AverageX(Summarize(Table, Table[Country], Table[ETIM_country]), calculate(Average([Suppier_Avg_col2_total]), allexcept(Table, Table[Country], Table[ETIM_country])))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

hello @amitchandak ,

 

Thanks for your help! The DAX gives me this result: 

 

bsz412_0-1656340755050.png

same number for each row, probably the dax needs a bit fine-tuning, but I dont know how...

This DAX works: 

 

CALCULATE(
AVERAGEX(
SUMMARIZE('table', 'table'[Country],'table'[ETIM Class],'table'[supplier_avg_CO2_total]),'table'[supplier_avg_CO2_total]
),
ALLEXCEPT('table','table'[Country],'table'[ETIM Class])
)

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.