Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Average from Average

Hi to all

I am new to qlikview and have one question concerning diagramm calculation. In a simplified manner we have the following table.

ArticelPersonRating
BallHolger10
BallMauro30
GoalHolger100

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


1 Reply
swuehl
MVP
MVP

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.