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: 
Anonymous
Not applicable

Average Count

Hi All

Need some help please.

I am trying to do the following

=avg(Count(Field1))/(Count(Field2))

I am getting Error in Expr - Nested Aggr not allowed

Basically i want to

count Field1 (eg 10)

Divide by

Count Field2 (eg 5)

Answer ....(eg 2)

And i want the average in percentage (eg. 20%)

In Text object.

Thanks All

1 Solution

Accepted Solutions
swuehl
MVP
MVP

The average needs a dimension, assuming DIM field:

=Avg(Aggr( Count(Field1)/Count(Field2) , DIM))

See also

Average – Which average?

View solution in original post

7 Replies
sunny_talwar

10/5 will be 200%, right:

You can do Count(Field1)/Count(Field2) and then use formatting on the numbers tab to show it as percentage

swuehl
MVP
MVP

The average needs a dimension, assuming DIM field:

=Avg(Aggr( Count(Field1)/Count(Field2) , DIM))

See also

Average – Which average?

Anonymous
Not applicable
Author

Though this was right i needed average

Anonymous
Not applicable
Author

Thanks Sunny

Anonymous
Not applicable
Author

This actually came up right

Thanks Swuehl and for explaiunging

Anonymous
Not applicable
Author

Swuehl and Sunny......you guys got a competition going on?

sunny_talwar

There can be no competition between Stefan and me Adil. He is a genius and I am still 10% (or may be less) level of where he is. Everyday I learn new things from him and I am thankful to him for being there for all of us whenever we need something