Qlik Community

Qlik Sense App Development

Discussion board where members can learn more about Qlik Sense App Development and Usage.

Announcements
Uploads getting stuck in the virus scanner. We are investigating.
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Partner
Partner

How create buckets in load script?

Create the following buckets for Discount:

    0-0.05

    0.06-0.1

    0.1-0.15

    0.16-0.25

 

    Show no. of Orders by Discount bucket for Order Priority = "Low". By default, this should show data for 2012 else for the maximum selected year.

 

1 Reply
Highlighted
Creator III
Creator III

If you want a precise answer you'll need to provide more information about your data and data load script at a minimum, but if you're looking to do this in Qlik's engine script language it would likely be the following depending on your data:

 

TableWhatever:

LOAD *, If(Discount>= 0 and Discount<=.05,"Low",if(Discount>.05 and <= .1,"This level",if(Discount>.1 and Discount<=.15,"This Other Level",if(Discount>.15 and Discount <=.25,"Another level","No level"))));

[Your source like SQL or or file or whatever];