We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Grouping Data into buckets

VipulG
5 - Atom

Hi All,

 

I have some data and I want to group them into buckets:

 

Let's say I have a duration field and I want to group songs by duration.

 

For Eg: Bucket 1 - The songs that have the duration between 100 seconds to 150 seconds should be in bucket 1

 

Bucket 2 - The songs that have the duration between 150 seconds to 200 seconds should be in bucket 2, and so on.

 

Any help is really appreciated.

 

Regards

Vipul

1 REPLY 1
JamesCharnley
13 - Pulsar

Hi @VipulG,

 

If you can provide the data or mock some up we can provide a better answer, but you'll need to use a formula tool with syntax something like the following to create a new field:

 

If [duration] > 100 and [duration] < 150 then '1'

elseif [duration] > 150 and [duration] < 200 then '2'

else '3'

endif

 

 

From there you'd be able to do any aggregating or further grouping using that field as a tag.

 

JamesCharnley_0-1665492527014.png

 

Labels
Top Solution Authors