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!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
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!
The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!
Check out the November 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 59 | |
| 46 | |
| 42 | |
| 23 | |
| 18 |
| User | Count |
|---|---|
| 193 | |
| 123 | |
| 99 | |
| 67 | |
| 49 |