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
christianfcbmx
Post Patron
Post Patron

average by filtering doesnt work

Dear Community,

 

I dont understand why the average doesnt work when I use  filter: For example: if I choose a sell team I get the right percentage of sells but if I choose 2 sells team I dont get the right avarege between those two.

 

Any Advice?????

 

In the first picture The 76.62% should be 79,44% considering those two sells team (101-104)

 

 

 

WhatsApp Image 2018-08-16 at 12.47.38.jpegWhatsApp Image 2018-08-16 at 12.47.00.jpegWhatsApp Image 2018-08-16 at 12.46.23.jpeg

1 ACCEPTED SOLUTION
MattAllington
Community Champion
Community Champion

It’s most likely due to the way Power BI filters first, then calculates. Eg

 

team A has 3 records

5,6,7 = avg of 6

 

team B has 6 records

10,12,10,20,18,20 = avg 15

 

avg across both teams = 10.5

 

but Power BI will add the total (108) divided by 9 = 12

 

you can solve it with averagex

 

=AVERAGEX(values(table[team]),[your measure]]



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

View solution in original post

2 REPLIES 2
MattAllington
Community Champion
Community Champion

It’s most likely due to the way Power BI filters first, then calculates. Eg

 

team A has 3 records

5,6,7 = avg of 6

 

team B has 6 records

10,12,10,20,18,20 = avg 15

 

avg across both teams = 10.5

 

but Power BI will add the total (108) divided by 9 = 12

 

you can solve it with averagex

 

=AVERAGEX(values(table[team]),[your measure]]



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.
I will not give you bad advice, even if you unknowingly ask for it.

Thank you @MattAllington

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.

Top Solution Authors
Top Kudoed Authors