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!Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I am preparing an weighted average and I want this output:
But my measure is this (based on a measure and a column):
Weighted Average Discount Rate =
VAR Discount = AVERAGE('Product'[DiscountRate])
VAR AveragePos = [Average Position]
Var TotalPos = CALCULATE([Average Position], ALLSELECTED(Transactions))
VAR PercentageOfTotal = AveragePos/TotalPos
Var ResultPerLine = SUMX('Product', PercentageOfTotal * SUM('Product'[DiscountRate]))
VAR Result = IF(HASONEVALUE('Product'[Contractnumber]), ResultPerLine, 8.47)
RETURN Result
And as you can see 8.47 is hardcoded, that is the needed solution. That is the total off the lines. Can somebody help me achieve this? I'm almost there....
I have a preview PBIX here: https://gofile.io/d/btaAgK
Hi @MiKeZZa ,
Sorry but I am not quite sure about your issue,could you pls advise me your expected output?Or point out where the issue is...
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!