Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Combining Multiple Rows into one with additional columns

mrobo
5 - Atom

Hi, I am trying to combine some rows based on employee name or employee ID and display the year to year salary all on the same line instead of in multiple row entries. 

 

Current look: 

 

Employee NameEmployeeIDYearSalary
Joe101201210,000
Tom202201212,000
Joe101201313,000
Tom20220149,000
Tom202201511,500

 

What I would like the output to look like: 

 

Employee NameEmployeeID2012 Salary2013 Salary2014 Salary2015 Salary
Joe10110,00013,000--
Tom20212,000-9,00011,500

 

I am still running into the issue of outputting multiple rows for the same employee name and employeeID

 

Any and all help would be appreciated. Thanks in advance!

2 REPLIES 2
CharlieS
17 - Castor
17 - Castor

@mrobo

 

It sounds like you have the Cross Tab portion figured out, but just need to consolidate salary values by employee and year first. I used your example data to first convert the salary data to a numeric field and summed by employee and year. Then a Cross Tab and Rename took care of the rest. Solution attached.

 

ponraj
13 - Pulsar

Uploading a sample workflow for your case. Cross Tab tool will help you to get the desired results. 

 

workflow.PNGresults.PNG

Labels