Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
qlikwiz123
Creator III
Creator III

Age Bucket

I need to create Age Buckets based on the values as follows

 

1 Day

7 Days

30 Days

60 Days

All

I know how to create the bucket but not sure how to get 'All' as one of the values. 'All' should give all the days from Day 1 to last day.

if(DateAge=1,'1Day',
if(DateAge<=7,'7 Days',
if(DateAge<=30,'30 Days',

if(DateAge<=60,'60 Days',
))))

 

This works but how do I add 'All' to this condition? Note that I don't know what the maximum number of days can be; so it should be dynamic

Labels (2)
5 Replies
Vegar
MVP
MVP

You can not add more than one value to a field so you can not add an IF... to add 'All' to all. 

You will need to create an DateAge dimension table to get this feature. Where you load all DateAge as a key to your transaction,  add your current if statement for [Age bucket] and theb concatenate all DateAge again, but this time add 'All' as [Age bucket].

 

Brett_Bleess
Former Employee
Former Employee

In addition to Vegar's post, here is a Design Blog post that may further help:

https://community.qlik.com/t5/Qlik-Design-Blog/Buckets/ba-p/1463216

Cheers,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.
Victor_Alumanah
Creator
Creator

Maybe you can load the field in twice, once in buckets and the second time for All.

While we teach we learn
Arthur_Fong
Partner - Specialist III
Partner - Specialist III

I have a sample app here, check this out:

https://community.qlik.com/t5/QlikView-App-Development/Create-a-third-bucket-based-on-first-and-seco...

 

Thanks and regards,

Arthur Fong

Brett_Bleess
Former Employee
Former Employee

You have quite a few posts at this point, please be sure you use the Accept as Solution button on the one(s) that helped you get things working, or if you do something on your own, consider posting that and mark it, and if you are still struggling after looking over all the posts, leave an update for everyone, and I am sure someone will shout back as quickly as they can.

Regards,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.