Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!
I want to calculate one total weighted average based on all entries in a table that responds to user selected filters on the table.
In these tables the quantity is the weight and hardiness is the base value.
So for table 1 the weighted avg would be 4.1785
But for table 2 the overall average would be 3.625
How could I show a weighted average for all fields in a filtered table?
Solved! Go to Solution.
Hi @Anonymous ,
Assuming I have your logic right - I think the answer you are expecting is 4.107 when nothing is selected? If so the following should work.
Weighted Avg =
Var Plantvalue = SUMX(Plants, Plants[Quantity]*Plants[Hardiness ])
Var Quantity = SUM(Plants[Quantity])
Var result = Plantvalue / Quantity
Return
result
Hi @Anonymous ,
Assuming I have your logic right - I think the answer you are expecting is 4.107 when nothing is selected? If so the following should work.
Weighted Avg =
Var Plantvalue = SUMX(Plants, Plants[Quantity]*Plants[Hardiness ])
Var Quantity = SUM(Plants[Quantity])
Var result = Plantvalue / Quantity
Return
result
Sorry, I'm not super familiar with PowerBI is that a DAX function? Where would I use that?
I think I figured it out. I'm assuming that it would be put into a new measure 🙂
Hi @Anonymous, sorry should have stated in my original message! Yes it's a new measure.
Hope the measure helped, if it addressed your problem please mark it as a solution!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 60 | |
| 59 | |
| 45 | |
| 17 | |
| 17 |
| User | Count |
|---|---|
| 115 | |
| 112 | |
| 38 | |
| 35 | |
| 26 |