Join the Alteryx Community’s Maveryx Summer Cup event! Compete, network with others, and earn your gold through a series of challenges from July 24th to August 11th. Learn more about the event here.

Alteryx Designer Desktop Discussions

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

Assign data to categories similar to Excel V Lookup

BradyT27
5 - Atom

Is there a more automated method in alteryx to assign values to a category besides a massive "If then" formula? I'm trying to do something similar to what you would do in excel when you use v lookup to assign to categories based on number....like this:

 

Lower bound of valuesGroup Name
00 - 1.99
22 - 3.99
44 +

 

In excel you would just take your value (let's use 2.5 as an example) and if you reference the table w/ a v lookup it would return the group name on the right. it's dynamic so you can change the bounds and then have this re-process. So 2.5 here would return the "2 - 3.99" group.

 

I know I could just build a long if statement but we're talking 40+ groups potentially and I'd like to be able to change this in a more structured way, is there any way of doing that? 

4 REPLIES 4
mceleavey
17 - Castor
17 - Castor

Hi @BradyT27 ,

 

can you post full datasets (mock) and we can build something for you .

 

M



Bulien

Christina_H
14 - Magnetar

Two possible solutions attached, although someone might be able to come up with something more efficient.  One appends the groups and then filters to the correct one, the other relies on the groups being equal size and rounds down to the nearest multiple of 2 to enable a join.

Christina_Hurrell_1-1635786788721.png

 

BradyT27
5 - Atom

Thanks for the help...Raw values (ones that need to be categorized or bucketed) would be in the first tab called "Raw Values" and the Groups that I want to use are in the "Group" tab. If it's something like where I have to use upper bound instead that's totally fine, you should be able to see pretty quickly that I basically just want anything between two values to be in a group, but want some non-alteryx users to be able to define these groups somewhere else and then pull the groups in automatically.

BradyT27
5 - Atom

This works great! I hadn't thought of appending all the fields and then narrowing it back down...might get a little messy with a couple hundred thousand rows x 18 categories but we'll hope it works haha. Thanks!

Labels