Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Output Issue

henrygeorge
8 - Asteroid

Hi Alteryx Team

 

How to move from this -

NameVehicle

Number

SteveCar23
GeorgeBus3

 

To output

123
NameVehicleNumber
SteveCar23
GeorgeBus3

 

Basically I want the headers to move to a Row data and to change the headers to 1,2 and 3. Please help

4 REPLIES 4
meljaafari
Alteryx Alumni (Retired)

Hi Steve,

 

the attached workflow would allow you to do that.

 

I used the Field Info tool to get all your column names as rows (and therefore as data) then cross-Tab'ed it and unioned that with your original data source,

 

Hope this helps,

Mo

MarqueeCrew
20 - Arcturus
20 - Arcturus

Hi @henrygeorge ,

 

 let me introduce you to my little friend, field info. This tool will output the name (and more) for each field. His buddy is the recordid tool. They are supported by a select tool. 

if you configure these tools together, you get:

 

1|Name

2|Vehicle

3|Number

 

 

 More you can Cross Tab the data to get 1 row of data with 1,2,3 as your headers and the data is your field names. 

now Union this data (as 1st input and force it to always come in first via the checkbox). Now bring your data into that union. The union configuration will be by Field position. 

 

your done!  

on a plane ...

 

 cheers,

 

 mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
afv2688
16 - Nebula
16 - Nebula

Hello @henrygeorge ,

 

This should do it

 

Untitled.png

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Regards

vsoni
Alteryx
Alteryx

in addition to the above, on some datatypes you can untick the 'First Row contains Field Names' to keep the row as a data row, and then use a dynamic rename to adjust the field names.

 

vsoni_0-1578915011128.png

 

Cheers

Labels