Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
mcapopa1
Contributor III
Contributor III

Creating sliders and or customer category filters

I have a large data set; about 50k rows.  The data includes customer, product model and the number of each product bought by customer.  My challenge; i would like to create categories based on the volume of products bought by customers.  For example:

> 1000 units

500-1000 units

250 - 500 units

100 - 250 units

50 - 100 units

25 - 50 units

10 - 25 units

5-10 units

< 5 units

4 Replies
Channa
Specialist III
Specialist III

do you have any sample data

Channa
jonathandienst
Partner - Champion III
Partner - Champion III

An calculated dimension like this:

Count(Aggr(
	If(Sum(Qty) > 1000, Dual('>1000', 1000),
	If(Sum(Qty) > 500, Dual('501-1000', 500),
	If(Sum(Qty) > 250, Dual('251-500', 250),
	If(Sum(Qty) > 100, Dual('101-250', 100),
	If(Sum(Qty) > 50, Dual('51-100', 50),
	If(Sum(Qty) > 25, Dual('26-50', 25),
	If(Sum(Qty) >= 10, Dual('10-25', 10),
	Dual('<10', 0))))))))
, Customer)) 

Sort by numeric, descending. This could be quite slow if the data set is large. Both aggr() and calculated dimensions can be slow to calculate.

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
mcapopa1
Contributor III
Contributor III
Author

Yes, here is some sample data.  You will notice customers may bave various product models.  I am summing the models to get the total and it is this total that I want o apply the filter/slider.

mcapopa1
Contributor III
Contributor III
Author

I think this is the right direction but i need to run/apply this filter/slider to a measure not a dimension. I have attached sample data to Channa's post.