Alteryx Designer Desktop Discussions

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

Changing a string of characters into a number

knobsdog
8 - Asteroid

I have a Request Number that looks like this:  PO-2019-06-03_073703.  I inserted a formula to take out the hyphens and underscores, Replace(Replace([Request Number],"-",""),"_",""), to just leave PO20190603073703.  I need to use the count of those Request Numbers in a Crosstab to show volume but it keeps throwing an error b/c it's a string and not a number.  I've tried changing it to a fixed decimal, int, double, etc in the select statement but it won't seem to work.  Any idea how I can get that string of letters and numbers to act like a number?  The only other option I can think of is to remove the PO at the beginning.

1 REPLY 1
pedrodrfaria
13 - Pulsar

Hi @knobsdog 

 

You can temporarily make them into a number in the formula tool by using the tonumber() function. 

 

But if I understood it correctly, you can just plug in a data cleansing to remove punctuation and a summarize to count it. Attached an example.

pedrodrfaria_0-1613095044990.png

 

 

Can you provide more detail on the data structure to further help you with it?

 

Pedro.

Labels