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

Divide sales into value-groups

Input are sales per sales-rep and date.

I want to divide them into certain value-groups according to their sale-volume (e.g. 1 - 10.000, 10.001 - 50.000, etc.) and then show group-sums (count and value).

E.G. in group 1 - 10.000 are 30 invoices with a total sales of 50.000.-

How can I do that ?

Reinhold

4 Replies
Not applicable

Hello,

You could try something like:

if(aggr(Sum(Sales), id_sales_rep) >= 1 and aggr(Sum(Sales), id_sales_rep) < 1000, 'Group 1', 'Group 2')

You can extend the number of groups by creating new conditions.

I recommend you to create a master item in order to reuse the new dimension within your app.

I hope it helps,

Estela

reinholdgraf
Creator
Creator
Author

I assume, this has to be done in the data-editor, when inputting the data into qs ?

Not applicable

You would say you have three options in this case:

1. You can add a dimension to your chart and write your expression, as follows:

adddimension.png

2. You can create a new dimension as a 'Master Item', so you do not have to copy and paste  the expression every time you want to use the dimension (see Qlik Sense Desktop -- Using The Master Library - YouTube):

*Note that the master item is limited to your app

masteritems.png

3. Or you can create a new column in the load script.

Estela

DavidFoster1
Specialist
Specialist

From hic

Buckets

I personally tend to use IntervalMatch approaches as they handle 'gaps' (buckets with no records in them)