Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi to all
I am new to qlikview and have one question concerning diagramm calculation. In a simplified manner we have the following table.
Articel | Person | Rating |
---|---|---|
Ball | Holger | 10 |
Ball | Mauro | 30 |
Goal | Holger | 100 |
I would like to calculate the average from average grouped by the article.
If I use the simple avg-function "avg(rating)" in a diagramm or table, the avg. rating for this table is: (10 + 30 + 100) / 3 = 46.7
The value I look for is the average rating - first grouped by the article
( (10 + 30 ) / 2 + 100 ) / 2 = 60
ball has an average rating from 20
goal has an average rating from 100
the total average rating is (20 + 100 ) / 2 = 60
What is the expression / formula I have to enter to get 60 and not 46.7 ?
Thank you very much for your help.
Greetings
Try
=avg( aggr( avg(Rating), Articel))
So group your avg(Rating) by Articel and get the average from that.
aggr() is advanced aggregation which you need to use if you want to embed an aggregation function like average inside another aggregation function.