Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

AVG count function

Hi experts,

I have a problem with my pivot table. I will explain the problem.

I have a table that looks like this

id     publication     reaction     district

1      2012_1          1               Holland

2      2012_1          2               Holland

3     2012_1           3               Holland

4     2012_1           4               Germany

5     2012_2           1               Holland

6     2012_2            2              Germany

If I make a count on district the result will be like Holland 4 and Germany 2

The situation i want is that there will be a count per publication on district.

The result i want is:

Holland = 2     publication 2012_1 = 3  + publication 2012_2 = 1     3 + 1 = 4 Average  = 2

Germany=1

Can anybody help me?

Thnx

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Create a straigt table chart with dimension district and as expresssion

=avg(aggr(count(id),district,publication))

Hope this helps,

Stefan

View solution in original post

1 Reply
swuehl
MVP
MVP

Create a straigt table chart with dimension district and as expresssion

=avg(aggr(count(id),district,publication))

Hope this helps,

Stefan