Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
See why BI users voted Qlik #1 in 11 categories. GET REPORT
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor

Aggregate Function with Count (groups of counts)

Hello Everybody,

Suppose I have Product-Brand, Customer, Month, Year,  and slot dimensions

By Referring to the picture, I want to distribute in slots the number of customers who bought quantities from a Product/Brand. To answer questions like How many customers who bought more than 30 Qty in Jan from product A.  

MohamedAl-Bana_0-1597956034195.png

Also, I am open for new ideas that can help me achieve the same result.

Best Regards,

Mohamed.

2 Replies
Highlighted
Partner
Partner

You will be most flexible in you analysis if you are able to achieve this front end. If not then you will predefine your aggregate condition and it will not reflect selections in other dimensions. If you could accept strict 10 cust intervals then you could create this dimension in your chart.

=aggr(class(count(distinct Customer), 10), Product)

If you don't accept strict 10 customer intervals then I guess you could manipulate the dimension with some kind of if() statement.

Plees ekskuse my Swenglish and or Norweglish spelling misstakes
Highlighted
Contributor
Contributor

Hi Vegar, 

Thanks for fast reply, please take into your consideration that I have predefined slots/intervals, and also I want to get number of customers at each slot, and each slot is sum(Qty). So, for example at (<10 units, A, Jan, 2020), I should display number of customers who bought less than  10 Qty from product A at Jan 2020. The same for other slots. At (between 10 and 20), How many customers who bought between 10 and 20 Qty from product A at Jan 2020.

Also, can you advice, how I can manipulate my dimension with if statements?

Thanks in advance,

Kind Regards.