8 Replies Latest reply: Dec 21, 2015 5:48 AM by Sangram Reddy

# Ranging no. of days

i want to create a bucket of ranging numbers

eg. 0-30 31-60 and so on..

• ###### Re: Ranging no. of days

Create an InLine table in your script.

• ###### Re: Ranging no. of days

Range are for days which is calculated by (max date - min date).

Since it is not a field name i cannot use class function.

• ###### Re: Ranging no. of days

Create an InLine table and use the IntervalMatch() function instead.

• ###### Re: Ranging no. of days

Can u Please Explain with an Example Since i Am new to Qliksense

• ###### Re: Ranging no. of days

Have you tried class function?

This is what the help says:

class(expression, interval [ , label [ , offset ]])

Creates a classification of expressions. The bin width is determined by the number set as interval. The result is shown as a<=x<b, where a and b are the upper and lower limits of the bin. The x can be replaced by an arbitrary string stated in label. 0 is normally the default starting point of the classification. This can be changed by adding an offset.

Examples:

class( var,10 ) with var = 23 returns '20<=x<30'

class( var,5,'value' ) with var = 23 returns '20<= value <25'

class( var,10,'x',5 ) with var = 23 returns '15<=x<25'

• ###### Re: Ranging no. of days

Yes i have tried Class Function as Class(Max Date-Min Date,30) and it gives me an Error Since (Max Date-Min Date) Is not a Field Name but a Calculation

• ###### Re: Ranging no. of days

Hi Kshitija,

Did you try using interval match in the data load script editor? If not its worth trying.

https://community.qlik.com/servlet/JiveServlet/previewBody/6820-102-1-8547/intevalMatch.pdf