Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello Community,
is it possible to create weighted averages QlikView? I have a table that looks like this:
Gruppe | Alter | Anzahl Personen |
---|---|---|
1 | 10 | 1 |
1 | 20 | 2 |
1 | 30 | 2 |
1 | 40 | 3 |
2 | 10 | 2 |
2 | 25 | 2 |
2 | 50 | 3 |
2 | 60 | 1 |
Now I would like the following calculations:
For Group 1: ((1 * 10) + (2 * 20) + (2 * 30) + (3 * 40)) / (1 + 2 + 2 + 3) = 230/8 = 28.75
For Group 2: ((2 * 10) + (2 * 25) + (3 * 50) + (1 * 60) / (2 + 2 + 3 + 1) = 280/8 = 35
Can someone help me because someone?
I thank you now,
Anja
Translated with Google Translate - Qlik Community Administrative Team
Hallo Community,
ist es möglich in Qlikview gewichtete Mittelwerte zu erstellen? Ich habe eine Tabelle die so aussieht:
<table>
Jetzt hätte ich gerne folgende Berechnungen:
Für Gruppe 1: ((1*10)+(2*20)+(2*30)+(3*40))/(1+2+2+3) = 230/8 = 28,75
Für Gruppe 2: ((2*10)+(2*25)+(3*50)+(1*60)/(2+2+3+1) = 280/8 = 35
Kann mir da irgendjemand helfen?
Ich danke schon jetzt,
Anja
sum(Alter*[Anzahl Personen]) / sum([Anzahl Personen])
Thank you so much! I thought it's the not weighted Version! But it works perfectly!