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!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
I have this data:
I am trying to get a weighted average, per LL.
That shall be the sum of: TotalPerCustomer * MDMCustomer / Total.
(The code for MDMCustomer is [TotalPerCustomer]/[MaxCustomer])
So for L1 it shall be: (50*1 + 35*1,4) /85 //(Whenever I try to do it, I get 35*1,4 twice)
And for L2 it shall be: (35*1,75) / 35
How can I achieve it?
@Anonymous
You can create the following measure to calculate the weighted average:
M =
var __t =
CALCULATETABLE( SUMMARIZE(Table3,Table3[LL],Table3[CUST], "Total", MAX(Table3[Total Per Customer]),"MDS", MAX(Table3[MDS Customer])), ALLEXCEPT(Table3,Table3[LL] ))
var __Total = SUMX( __t , [Total] )
var __line = SUMX( __t , [Total] * [MDS] )
return
DIVIDE( __line , __Total )
⭕ Subscribe and learn Power BI from these videos
⚪ Website ⚪ LinkedIn ⚪ PBI User Group
User | Count |
---|---|
15 | |
9 | |
8 | |
6 | |
5 |
User | Count |
---|---|
29 | |
18 | |
15 | |
7 | |
6 |