Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
agarwal16
Contributor
Contributor

Weighted Average

Hi,

Need Help!

I have to calculate Weighted avg where Number and Entity are same:

sum(TC1+TC2+TC3)/Sum(Q1+Q2+Q3)

Number Entity QTY Total Cost Unit Cost Weighted Avg
100 ROP 10 Total Cost * QTY Total Cost * QTY
100 RUH 3 Q1 20 TC1  
100 RUH 4  Q2 10 TC2  
100 RUH 5   Q3 20 TC3  
Labels (1)
2 Replies
Or
MVP
MVP

Weighted average in this scenario would presumably be:

Sum(QTY * [Total Cost]) / Sum(QTY)

And would be calculated for whichever dimensions you put in your table / object.

agarwal16
Contributor
Contributor
Author

For the same entity we have to calculate sum of all 3 rows