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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Mdjenkins
Contributor II
Contributor II

Summing totals by a dimension and then finding the average

Good morning guys.

 

How I can find the AVG of a Sum by a Dimension. 

To elaborate.  I have a table that has many rows for a vendor it may look something like this

 

VenderName   Count

VenderA             12

VenderB             11

VenderA             10

VenderA             10

VenderC             15

VenderC             20

 

For VenderA there total is 12+10+10 or 32

For VenderB there total is 11

For VendorC there total is 35

 

The value I am looking for is  26 (the average of 32,11 and 35)

How do I create an expression that will Sum the counts by Vendor and then give me the average of those sums

 

Thanks,

Labels (1)
1 Solution

Accepted Solutions
sunny_talwar

May be this

Avg(Aggr(Sum(Count), VendorName))

View solution in original post

3 Replies
sunny_talwar

May be this

Avg(Aggr(Sum(Count), VendorName))
deborahs
Contributor III
Contributor III

Mister Sunny, could you please explain the expression? I'm a student and new to Qlik and as per my understanding, count is a function and I'm not sure why have you used it in this. I'm just curious about the question.. Thanks in advance

Mdjenkins
Contributor II
Contributor II
Author

Yes it looks like it worked. Thank you very much. It Aggragates the sum of count on vendorName and then finds and average.