Forum Discussion
JeremyCooper
10 years agoNew Member
Calculating the sum of dynamically weighted values
When calculating weighted values for a weighted average, how can we calculate a value which is the sum of those weighted values? In the example below: Total Quantity = SUM(Sheet1[Quantity]) ...
- 10 years ago
JeremyCooper we need to know how your data is set up in the source
Here's another Measure which also worked for me - but again I don't know how your data is set up so... don't know if will work for you
Quantity Weighted Average NEW = IF ( COUNTROWS ( VALUES ( 'Sheet1'[Name] ) ) = 1, [Proportion of Total Selected Quantity] * [Avg X], SUMX ( VALUES ( 'Sheet1'[Name] ), [Proportion of Total Selected Quantity] * [Avg X] ) )See Picture...
OwenAuger
Super User
10 years agoTry
Quantity Weighted Avg =
SUMX (
VALUES ( Sheet1[Name] ),
[Proportion of Total Selected Quantity] * [Avg X]
)