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: 
ivan_will
Partner - Creator II
Partner - Creator II

Average of average?!

Hi, have a chart with a dimension Supplier and an expression average customers per day.

Here is the expression: Avg( Aggr( Count(DISTINCT [Customer]),Date, [Supplier]))

Want in another expression to make the total average for all suppliers For example:

Supplier 1 - 10  average for all - 15

Supplier 2 - 20  average for all - 15

So how to make the expression (Avg( Aggr( Count(DISTINCT [Customer]),Date, [Supplier]))) to do that?

Thanks

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Try

=avg(total aggr(avg(aggr(count(DISTINCT Customer),Supplier,Date)),Supplier))

Or please post some sample lines of your input data.

View solution in original post

6 Replies
swuehl
MVP
MVP

Maybe

=Avg( Aggr( Count(DISTINCT [Customer]),Date))

or

=Avg(TOTAL Aggr( Count(DISTINCT [Customer]),Date, [Supplier]))

ivan_will
Partner - Creator II
Partner - Creator II
Author

Nope , it doesn't work.

whiteline
Master II
Master II

I guess we missed the point.

Could you explain what the 'Supplier 1 - 10' and Supplier 2 - 20' is?

ivan_will
Partner - Creator II
Partner - Creator II
Author

Supplier  /   average customers per day / average for all suppliers

1               10                                       20

2               20                                        20

3               30                                        20

whiteline
Master II
Master II

and you want ?

swuehl
MVP
MVP

Try

=avg(total aggr(avg(aggr(count(DISTINCT Customer),Supplier,Date)),Supplier))

Or please post some sample lines of your input data.