Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Announcements
Coming your way, the Qlik Data Revolution Virtual Summit. October 27-29. REGISTER
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Not applicable

Taking Average after COUNT

HI,

I have to count ACTIVITY and then take its average. I am using this code

=Avg(Count(ACTIVITY)) but its not working.

Can Anyone help me with this.

With Regards,

Vikas

1 Solution

Accepted Solutions
Highlighted
Not applicable

See attached... Hope it helps

View solution in original post

5 Replies
Highlighted
Not applicable

Could you give a bit more details? An example qvw or a situation (with some data in a table) where we can see what you want? Average per....? year, week, month or per car, or per person? per ehhh??

Lets say it is activity per person and your table is like this

- person 1 day 1 activity 3 hours

- person 1 day 1 activity 5 hours

- person 2 day 1 activity 3 hours

and you'd like to have the average hours per person, then a chart with

- dimension person and

- expression  like sum(activity) / count(person)

would give you the average activity per person

Does this help?

Avg(count(activity)) won't work as count(activity) just returns 2 and 1 in my example (per person) the average of that count would result in the same values too...

Highlighted
Not applicable

No I have Activity like

ACTIVTY

1)CREATED

2)OPEN

3)VIEWED

I have to find out how many activity is done per month.

Which I can find by COUNT(ACTIVITY), but I have to also find AVERAGRE Activity per month...

How can I do this?

Highlighted
Not applicable

See attached... Hope it helps

View solution in original post

Highlighted
Not applicable

Thanks It worked..

Highlighted
Specialist III
Specialist III

You can use the following expression also:

Avg(Aggr(Count(activity),activityYearMonth))