Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Iwin
Partner - Creator
Partner - Creator

Create a third bucket based on first and second bucket

Hi,

I want to create buckets based on following values 

0-100,'BUCKET1',

100-200,'BUCKET2',

0-200,'BUCKET3'

 

The third bucket is not displayed.Any solution to display the third bucket as well as the first two ?

Labels (3)
1 Solution

Accepted Solutions
Arthur_Fong
Partner - Specialist III
Partner - Specialist III

There you go:

clipboard_image_0.png

After intervalmatch, concatenate a fresh fact table and assign 'BUCKET3' as BucketName.

Refer qvw below as reference.

Thanks and regards,

Arthur Fong

View solution in original post

3 Replies
ajaykakkar93
Specialist III
Specialist III

Hi,

You can try this if this helps.

Client_Final:
load * inline [
Customer ID,Customer Name,Customer Age,Customer Address
1,Ajay,25,Address1
2,Avi,31,Address2
3,Gauresh,25,Address3
4,Bilal,25,Address4
5,Yogesh,25,Address5
6,Wasim,25,Address6
7,Sanket,20,Address7
8,Ankit,21,Address8
9,Vishal,20,Address9
10,Mack,31,Address10
];

Final:
load
[Customer ID],
[Customer Name],
[Customer Age],
[Customer Address],
if([Customer Age]<25,'0 - 25',
if([Customer Age]>=25 and [Customer Age]<=35,'25 - 35',
if([Customer Age]>=36 and [Customer Age]<=45,'36 - 45'
))) as AgeGroup
Resident Client_Final;


Concatenate(Final)
load
[Customer ID],
[Customer Name],
[Customer Age],
[Customer Address],
if([Customer Age]>0,'All Age') as AgeGroup
Resident Client_Final;

Drop Tables Client_Final;

exit script

Please mark the correct replies as Solution. Regards, ARK
Profile| GitHub|YouTube|Extension|Mashup|Qlik API|Qlik NPrinting

Arthur_Fong
Partner - Specialist III
Partner - Specialist III

There you go:

clipboard_image_0.png

After intervalmatch, concatenate a fresh fact table and assign 'BUCKET3' as BucketName.

Refer qvw below as reference.

Thanks and regards,

Arthur Fong

Brett_Bleess
Former Employee
Former Employee

Ameya, did Arthur's post and example app do what you needed?  If so, be sure to use the Accept as Solution button on his post to let others know and give him credit for the help.  That would be the preferred method of doing things from what I know, so hopefully that did the trick.  If you still have further questions, shout back.

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.