Forum Discussion
Oleg222
5 years agoHelper II
Measure from data in one column
I have table: Line Indicator Value
A Efficiency 90
B Efficiency 80
A Weight 5
B Weight 10 I am trying to plot a metric that calculates the weighted average ...
- 5 years ago
Oleg222
Can you try this version?Weighted Average = DIVIDE( SUMX( VALUES(Table3[Date]), CALCULATE( SUM(Table3[Value]), Table3[Measures] = "Efficiency1") * CALCULATE( SUM(Table3[Value]), Table3[Measures] = "Weight1") ) , SUMX( VALUES(Table3[Date]), CALCULATE( SUM(Table3[Value]), Table3[Measures] = "Weight1") ) )
Fowmy
5 years agoSuper User
Oleg222
Try this:
Weighted Average =
CALCULATE(
DIVIDE(
SUMX(
VALUES(Table3[Date]),
CALCULATE( SUM(Table3[Value]), Table3[Measures] = "Efficiency1") *
CALCULATE( SUM(Table3[Value]), Table3[Measures] = "Weight1")
)
,
SUMX(
VALUES(Table3[Date]),
CALCULATE( SUM(Table3[Value]), Table3[Measures] = "Weight1")
)
),
Table3[Value] <>0
)