Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Announcements
QlikWorld, June 24-25, 2020. Free virtual event for DI and DA gurus. Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Creator II
Creator II

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
Highlighted
Partner
Partner

Re: Age Bucket

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].

 

Plees ekskuse my Swenglish and or Norweglish spelling misstakes
Highlighted
Digital Support
Digital Support

Re: Age Bucket

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.
Highlighted
Creator
Creator

Re: Age Bucket

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

While we teach we learn
Highlighted
Partner
Partner

Re: Age Bucket

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

Highlighted
Digital Support
Digital Support

Re: Age Bucket

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.