Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
rahulsingh12
New Contributor III

Bucket In Qlikview

Hi  i have a master calendar and a po date.

i want to create a bucket of the difference of the two date.

so if the difference of two is 22 it should fall in 0-30 bucket.

When i try using Class or interval function in dimensions it says error in calculated dimension.

Regards,

4 Replies
techvarun
Valued Contributor II

Re: Bucket In Qlikview

Try below,


Or share a sample data and expected output.


If(Day >= 0 and Day <= 1, Dual('0-1days',1), If(Day>=2 and Day <= 8, Dual('2-8days',2), If(Day >=9 and Day <=11,Dual('9-11days',3)))) as Day_Bucket;

Load PO, PODate, Day(PODate) as Day;

Age Bucket with One Date Column

Partner
Partner

Re: Bucket In Qlikview

Hi rahul,

May be like Following Way:

I

=if(Date-podate <=20,'A.0-20',

    if(Date-podate <=30,'B.21-30','C. >30') ) as [Bucket]

thanks,

Arvind Patil

Re: Bucket In Qlikview

Instead in dimension, use class function in script and then use it as dimension

effinty2112
Honored Contributor

Re: Bucket In Qlikview

Hi Rahul,

Class(DateDiff,30) should work as a calculated dimension. What expression did you use?

Regards

Andrew