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

average, count class Problem

Hi,

I have a table custumers. For every customer I have several kpis, e.g.
Customer KPI
=========================
Customer_1: 2
Customer_1: 2
Customer_2: 4
Customer_2: 2
Customer_2: 6
Customer_3: 2
Customer_3: 2
customer_4: 11


I'd like to calculate the average of every customer: e.g. Customer_1: 2, Customer_2: 4, Customer_3: 2, Customer_4: 11

So far no problem. Now I'd like to create a class of average KPIs e.g. 1-5, 5-10, 10-15,..

My Barchart should show the number of customers with the classes. eg.

class: 1 - 5 contains Customer 1,2,3 because they have the average kpi 2,4, 2. -> Barchart should show for Class 1-5 the value 3 (3 customers).
class: 5 - 10 -> 0
class: 10 - 15 -> 1

Any chance with aggr()?

Thanks in advance.

Regards

3 Replies
Not applicable
Author

Hi Aloah,

see the attached example.

Rainer

manishkumar75
Partner - Creator II
Partner - Creator II

Hi,

Plz see the attached example.

- Manish

Not applicable
Author

Hi,

thanks. This works so far.

Now I also have a datefield:

Customer KPI Date
=========================
Customer_1: 2 01.01.2008
Customer_1: 2 01.01.2009
Customer_2: 4 02.01.2008
Customer_2: 4 02.01.2009
Customer_2: 6 03.01.2009
Customer_3: 2 01.01.2009
Customer_3: 2 02.01.2009
customer_4: 11 01.01.2009

The Average for customer_2 is in 2008: in 2009: 5 and Overall 4,6

The Bar Chart should show the average dynamic. Is this possible?