Alteryx Designer Desktop Discussions

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

How to turn a specific field's records into field names?

StephenBurns
6 - Meteoroid

Hi all,

 

I have the following dataset that I would like to transform but do not know how. I would like to take the records in the 'Purchase / Sale' field and turn them into field headers and then have the value associated with the record be placed under the new field header. Before and after shown below. I feel as though I can get the desired result by doing some extractions and merges but was wondering if there was a simpler way. Please let me know if anyone has any suggestions. Thanks in advance!

 

Original

 

CodePurchase / SaleValue
APurchase5
BPurchase6
BSale-3
CSale-5
DPurchase9

 

Adjusted

 

CodePurchaseSale
A50
B6-3
C0-5
D90
1 REPLY 1
jdunkerley79
ACE Emeritus
ACE Emeritus

You can use a Cross Tab tool to do this.

 

2018-12-04_20-27-28.png

 

Group by code, using the Purchase / Sale as Column Header and the Sum of the Value for the Values.

 

This will leave nulls in the table but this can be fixed using a Data Cleansing tool

Labels