Alteryx Designer Desktop Discussions

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

Grouping issues

saurabh79
7 - Meteor

Hi Guys, 

I am trying to get help with the following issue. I have been working on it for a few days to no avail. Looked everywhere before posting. Basically, i have data spread over several rows relating to one client. I would like to have only one row per client even if it means the number of column increases. So, to illustrate:

 

What i have:

 

CustomerPurchaseCar CompanyCar ModelCar CostTV ModelTV CompanyTV CostPhone CompanyPhone CostLaptop CompanyLaptop Cost
john SmithCarMitsubishiLancer50,000       
john SmithTV   s-100GE10,000    
Richard MarxPhone      Samsung1000  
Richard MarxCarToyotaHilux45,000       
Bob BrownLaptop        Dell2000
Bob BrownCarToyotaTarago45000       
Roger DavidTV   s-100GE800    

 

 What i want:

 

 

CustomerCar CompanyCar ModelCar CostTV ModelTV CompanyTV CostPhone CompanyPhone CostLaptop CompanyLaptop Cost
john SmithMitsubishiLancer50,000 s-100 GE10,000    
Richard MarxToyotaHilux45,000   Samsung1,000  
Bob BrownToyotaTarago45,000      Dell2,000
Roger David   s-100GE8,000    

 

Many Thanx.

3 REPLIES 3
BenMoss
ACE Emeritus
ACE Emeritus
A quick and dirty method would be to use the summarize tool.

Grouping by the client name and then using the concatenate function on all of the other fields, at the bottom you would specify no concatenate delimiters.

A more dynamic method would be to transpose all of your fields apart from the name field.

Then filter out rows where the newly created value field is NULL.

Then use the cross tab tool. Your client name field do A be the group by field. Your name field will be your headers field and your value field would be your value field.

I'm mobile so I can't post an example but I'm sure someone else can.

Ben
ponraj
13 - Pulsar

Here is the sample workflow for your case.  Hope this is helpful. 

 

WorkflowWorkflowResultsResults

saurabh79
7 - Meteor

Thank you Ponraj. Works like a charm. A lot complicated than i thought (im just a beginner).

 

Thanks again.

Labels