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

How do I flatten data to a single row?

price_is_right
6 - Meteoroid

I have data arranged by an individual loan. The loan can have up to 3 borrowers.  Each borrower is uniquely identified, but on a one per row basis.

I would like to combine all of these and leave the rest of the row [null] depending on whether or not these borrowers exist.

Sample_Alteryx.png

The ideal output would be: Loan ID, Borrower 1, Borrower 2, Borrower 3   . . .and there would only be one record per individual Loan (in this case, 3).




5 REPLIES 5
nakamott
8 - Asteroid

@price_is_right 

 

you will want to use the summarize tool.

 

GroupBy LoanID

sum on primary

sum on secondary

sum on third

price_is_right
6 - Meteoroid



How would this work if the BorrowerIDs weren't integers?  If they were alphanumeric instead?  Is there a more general approach to solving this other than relying on SUM? 

estherb47
15 - Aurora
15 - Aurora

Hi @price_is_right ,

 

If the borrowers are text, you can use the concatenate method in the Summarize tool. Don't use any characters to separate.

image.png

 

Please let me know if that works for you.

 

Cheers!

Esther

neilgallen
12 - Quasar

@estherb47 definitely has the simplest solution, but for a more dynamic route (in the however unlikely event that an additional borrower is added), you can transpose and then cross tab your data, grouping on the loanID in both situations. This would account for any future expansion in the number of available borrowers.

price_is_right
6 - Meteoroid

Thank you!

Labels