Forum Discussion
Jacodw0901
6 years agoNew Member
Weighted average calculation
Hi, I would like to calculate the weighted average values on a matrix. This is a sample dataset: UserId CritID CritSelVal PoolCritID PoolSelVal 1 3 0.20 4 5.00 1 2 0.14 5 ...
- 6 years ago
have you tried looking at the below solution
https://community.powerbi.com/t5/Desktop/Weighted-average-table-calculation/m-p/772223
Anonymous
6 years agoNot applicable
You can use HASONEVALUE to get a different result in the total.
For example, I used this for one of my averages. Because I wanted my total to be the total of all the averages, not an average of all the averages.
IF(HASONEVALUE(Items[Item]),AvgCost , SUMX(VALUES(Items[Item]),AvgCost))