Start Free Trial

Alteryx Designer Desktop Discussions

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

Crosstab records based on column names

O_Vizzle
5 - Atom

Hi everybody,

 

hope i can find an answer here. I googled the forum but couldn't find a solution. I would like to cross tab the first table grouped by the header names and choose weekNumbers as new headers. So make the table horizontal. 

 

I found a way to do this with one single column using the CrossTab Tool. But how can i apply this easily to multiple columns?

 

Thank you very much for your support guys!

 

 

Input Table

WeekNumberForecast 1Forecast 2

12

56111
1366254
1421654
152356

 

Result table

WeekNumber12131415

Forecast 1

56662123
Forecast 211125465456
4 REPLIES 4
patrick_digan
17 - Castor
17 - Castor

@O_Vizzle Give the attached a shot. The key is to transpose and then crosstab using a record ID. 

O_Vizzle
5 - Atom

This is amazing! Thank you very much for that!

 

One thing only: The last part where you cut the ID Records from the Names. How can i make sure to cut a 2 digit or 3 digit ID? 

 

Thanks a lot Patrick!

patrick_digan
17 - Castor
17 - Castor

@O_Vizzle Assuming none of your fields start with a number to begin with, you could change that formula to 

Regex_replace([Name],"^\d+","")

This would replace all the digits at the beginning regardless of how many there are.

O_Vizzle
5 - Atom

Thats brilliant! Thank you very much!

 

have a nice day and start into the weekend !

Labels
Top Solution Authors