Free Trial

Alteryx Designer Desktop Discussions

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

Changing 4 rows of data to 4 columns, using the first column as headers

MATTHEW_KING1
8 - Asteroid

Was hoping someone could please help me understand how to change the below 4 rows of data into 4 columns of data with Name, Number of Critical Reviews, Rating and Year as column headers? Thanks in advance.

 

 

Name10 Cloverfield Lane13th20th Century Women19451985
Number of Critical Reviews301195217168245
Rating  90%  97%  89%  97%  95%
Year20162016201720172018
7 REPLIES 7
atcodedog05
22 - Nova
22 - Nova

Hi @MATTHEW_KING1 

 

Hope this is what you are looking for. I am using transpose and crosstab to achieve it.

atcodedog05_0-1621869241225.png

 

1. Using record id tool to set key column.

2. Keeping record id as key transpose all columns.

3. Using field name as key, name as record id and value as value crosstabing it to table

4. Using dynamic rename to take names from first row.

5. Data cleanse to clean spaces

 

Hope this helps 🙂

 

MATTHEW_KING1
8 - Asteroid

Thanks, much appreciated. I thought it would be simpler than this to be honest, a simple transpose in Excel but a fair few more steps in Alteryx. Will take some getting used to.

MATTHEW_KING1
8 - Asteroid

Out of interest, what would be the solution using a Input Data tool instead of the Text Input tool?

atcodedog05
22 - Nova
22 - Nova

Hi @MATTHEW_KING1 

 

It will be same just replace it. You might have to set first row contains data option for your current scenario

atcodedog05_0-1621870596476.png

 

Hope this helps 🙂

atcodedog05
22 - Nova
22 - Nova

Hi @MATTHEW_KING1 

 

Here is a workflow using excel file. I am using the same steps suggested above.

 

Input tool:

atcodedog05_0-1621870596476.png

Workflow:

atcodedog05_0-1621945468254.png

Hope this helps 🙂

mceleavey
17 - Castor
17 - Castor

HI @MATTHEW_KING1 ,

 

yeah, it is just the same in Alteryx but the beauty of Alteryx is you only do it once. No more manual messing around in Excel.

 

Friends don't let friends Excel.

 

M.



Bulien

MATTHEW_KING1
8 - Asteroid

Perfect, thanks so much.

Labels
Top Solution Authors