Join us for an expert-led overview of the tools and concepts you'll need to pass exam PL-300. The first session starts on June 11th. See you there!
Get registeredPower BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.
I am using the following expression to get a SUMPRODUCT measure, which gives me the weighted average [Interest Rate] based on [Capital].
In some cases, [Interest Rate] = 0 because there's no loan outstanding, but the expression then has too high a denominator. If I insert
Asset ID | Capital | Interest Rate |
A | 2200 | 9% |
B | 3330 | 5% |
J | 1600 | 0% |
Desired Output | 6.59% | |
Current Output | 5.11% |
Solved! Go to Solution.
@mrothschild - The following Measure should work. It first removes the 0-interest rows and then performs the weighted average.
Weighted =
var _desired_rows = FILTER(Rates, Rates[Interest Rate] > 0)
return DIVIDE(
SUMX(_desired_rows,[Interest Rate] * [Capital]),
SUMX(_desired_rows,[Capital])
)
@mrothschild - The following Measure should work. It first removes the 0-interest rows and then performs the weighted average.
Weighted =
var _desired_rows = FILTER(Rates, Rates[Interest Rate] > 0)
return DIVIDE(
SUMX(_desired_rows,[Interest Rate] * [Capital]),
SUMX(_desired_rows,[Capital])
)
Thanks so much - works perfectly!
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
76 | |
75 | |
54 | |
37 | |
33 |
User | Count |
---|---|
99 | |
56 | |
50 | |
43 | |
40 |