Qlik Community

QlikView App Development

Discussion Board for collaboration related to QlikView App Development.

Highlighted
Ameya
New Contributor

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 ?

1 Solution

Accepted Solutions
Partner
Partner

Re: Create a third bucket based on first and second bucket

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
Valued Contributor

Re: Create a third bucket based on first and second bucket

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

Partner
Partner

Re: Create a third bucket based on first and second bucket

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

Support
Support

Re: Create a third bucket based on first and second bucket

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 don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question.