Missed the Q4 Fall Release Product Update? Watch the on-demand webinar for more info on the latest in Designer 24.2, Auto Insights Magic Reports, and more!
Free Trial

Alteryx Designer Desktop Discussions

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

Crosstab Tool removing special chars from strings?

jcardoso
8 - Asteroid

Hi all,

the crosstab tool is removing special chars like '&' from a string 'UK & Ireland' results in 'UK___Ireland'  as print below?
Can you fix this?

jcardoso_0-1624552207451.png

 


Thank you,

2 REPLIES 2
DawnDuong
13 - Pulsar
13 - Pulsar

hi @jcardoso 

A very neat trick is shown in this video to workaround the exact issue you have. Every useful when you want to preserve the formatting.

https://community.alteryx.com/t5/Videos/Chained-Apps/td-p/43743

Dawn.

Maskell_Rascal
13 - Pulsar

Hi @jcardoso 

 

When you Crosstab in Alteryx all non-word characters are stripped out and replaced by an underscore. Its essentially doing this: Regex_Replace([Field1],"[^a-zA-Z0-9]",'_'), where Field1 is whatever field you are using for your new headers. 

 

So to solve for this, we can use that same formula in a separate branch of the data stream prior to the Crosstab tool, and then use a Dynamic Rename to bring back the corrected field names. 

 

Maskell_Rascal_0-1624554758819.png

Attached is a sample workflow for you to try out. 

 

If this solves the problem please mark answer as correct, if not let me know!

 

Cheers!

Phil

Labels
Top Solution Authors