Alteryx Designer Desktop Discussions

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

grouping customers using an input file

Himanshu123
7 - Meteor

Hi

 

I want to group my customers based on size and segment. For example if a customer is in segment X, and has the size of 18, then it should be in customer group 15-20.

 

I have around 400 combinations of such groupings and it is really difficult to do it using the formula option.

 

I was thinking of using an input file to get the customer grouping. Basically it would say if the customer segment is X, and it lies between the min and max of the group banding then return me the grouping of that row.

SegmentMinimum size of groupMaximum size of groupGrouping
X1520

15-20

Y1015

10-15

X2125

21-25

 

Thanks in advance for the help.

4 REPLIES 4
LordNeilLord
15 - Aurora

Hey @Himanshu123

 

I'd use the generate rows tool to expand your grouping, so you have a value for every point in the range. Then you can easily join this back to your customer data:

 

Range.PNG

Himanshu123
7 - Meteor

Thanks. It was simpler than I thought. Works like a charm.

Himanshu123
7 - Meteor

Hi

 

I want to get the solution such that even if there is no customer, I get the grouping displayed. I am taking a left join of it to get over it, however, if I display the results on tableau, I am not getting the desired output if I filter for year in tableau.

 

Can you help me with that.

 

BenMoss
ACE Emeritus
ACE Emeritus
Hi!

You need to scaffold your data.

Use a summarize tool to create a list of all year's in your dataset and append this to the records that fall out the left side of your join, then union this back to your J records.

Ben
Labels