Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Creating value buckets on existing field

Hi All,

I am trying to create value buckets on an existing field. My field is 'VendorSpend' and I want the buckets like:

>50k

50k-250k

250k-500k

500k-1m

and so on.

Any help is much appreciated. Thanks

I

1 Solution

Accepted Solutions
rupamjyotidas
Specialist
Specialist

In Script:

Load *,

   If((VendorSpend) < 50000, Dual('<50k', 1),

     If((VendorSpend) < 250000, Dual('50k-250k', 2),

     If((VendorSpend) < 500000, Dual('250k-500k', 3),

     If((VendorSpend) < 1000000, Dual('500k-1m', 4))))) as VendorBracket


From XYZ

View solution in original post

5 Replies
sunny_talwar

I am guessing that this would be a calculated dimension? May be like this:

Aggr(

     If(Sum(VendorSpend) < 50000, Dual('<50k', 1),

     If(Sum(VendorSpend) < 250000, Dual('50k-250k', 2),

     If(Sum(VendorSpend) < 500000, Dual('250k-500k', 3),

     If(Sum(VendorSpend) < 1000000, Dual('500k-1m', 4)))))

, Vendor)


ecolomer
Master II
Master II

rupamjyotidas
Specialist
Specialist

In Script:

Load *,

   If((VendorSpend) < 50000, Dual('<50k', 1),

     If((VendorSpend) < 250000, Dual('50k-250k', 2),

     If((VendorSpend) < 500000, Dual('250k-500k', 3),

     If((VendorSpend) < 1000000, Dual('500k-1m', 4))))) as VendorBracket


From XYZ

Anonymous
Not applicable
Author

Thanks Rupam. Exactly what i wanted.

Anonymous
Not applicable
Author

Thanks but i don't need summation.