New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

New Contributor III

Creating buckets

Hello community,

How to make buckets as per the below image:

Thankyou

8 Replies
Contributor II

Re: Creating buckets

Hi,

Could you please more specific as the image does not seem to have any bucketing across any dimension

Esteemed Contributor

Re: Creating buckets

Your bucketing is not clear? is it a days bucketing or an Amout bucketing?

AMOUNT BUCKETING:

I'd suggest sthing like this:

as dimension : class(InvoiceAmount, 30 ,'Amount') as a dimension :

Per analogy:

Or you can have more control :

if(((InvoiceAmount)>0 and (InvoiceAmount)<=30),('0-30'),

if(((InvoiceAmount)>30 and (InvoiceAmount)<=60),('30-60'),

if(((InvoiceAmount)>60 and (InvoiceAmount)<=90),('60-90'),

'>90'

)))

)

DAYS BUCKETING:

Now, if you want to calculate the number of days (today-date) , I'd suggest you to do sthing like this in the script:

if(Days<=60,'30-60',

if(Days<=90,'60-90',

if(Days<=120,'90-120','Over 120')))

) as intervalles;

Today()-DueDate as Days;

yourtable:

Then in the presentation, choose intervalles as dimension and you'll have sthing like this:

Contributor II

Re: Creating buckets

Hi Kshitija,

There are two ways to create a bucket.

1. Create a field for the bucket in the script.

Ex.

if(Today()-[Invoice Due by]>90,'>90',

if(Today()-[Invoice Due by]>59,'60-90',

if(Today()-[Invoice Due by]>29,'30-60',

if(Today()-[Invoice Due by]>=0,'0-30','Open')))) As DueDaysBucket.

Make sure your default Date format and {invoice Due by] field format is same.

You can change the value of above expression as per your requirements.

2. Using Class function.

Ex.

if ( Value > 0 , class(Value,10))

Valued Contributor

Re: Creating buckets

Please go through CLASS function in qlik for bucketing  ,

Creating Aging Buckets within QlikView

Above link might help you , else can you please provide some sample data in excel. then we can help very easily .

Valued Contributor

Re: Creating buckets

When use Class, it's good to wrap it by Replace function to get rid ot this  '<= sales < '.

Tomasz

Valued Contributor III

Re: Creating buckets

Hi Kshitija,

look at this: Class Function

i hope that helps

Beck

Valued Contributor III

Re: Creating buckets

Hi,

As others suggested that use of Class() function would be a good fit. I tend to use it in the load script:

And in your pivot table, you can use the buckets field in the set analysis:

I am also attaching the qvf file for your reference.

Thanks

MVP

Re: Creating buckets

Yes, That's the easy way as i feel. May be this?

Replace(Class(sales, 5, 'Sales'),'<= sales', '-')