Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
rahulsingh12
Contributor III
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
Specialist II
Specialist II

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

arvind_patil
Partner - Specialist III
Partner - Specialist III

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

Kushal_Chawda

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

effinty2112
Master
Master

Hi Rahul,

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

Regards

Andrew