Alteryx Designer Desktop Discussions

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

Extracting numeric values for calculation

CraigC_RG
6 - Meteoroid

I have attached the dataset. I am trying to extract the number of vehicle spaces and the number of bicycle spaces, to then calculate the difference between the total number of vehicle and bicycle spaces available. 

 

I had a go using the formula tool (GetWord) function to add 2 new columns then subtracting the 2 columns, then using the Summarize tool sum up the total. Is there an easier way?

 

Also, is the GetWord function the easiest method to extract the numeric values?

 

 
 

 

 

7 REPLIES 7
nagakavyasri
12 - Quasar

Could you attach the datasheet or zip the workflow?

CraigC_RG
6 - Meteoroid
 

Hi - I have tried attaching the datasheet. 

 

FinnCharlton
13 - Pulsar

Hi @CraigC_RG , I would use the RegEx tool's Parse function to do this:Screenshot 2023-06-26 101124.png

Hope this helps!

CraigC_RG
6 - Meteoroid

Thank you. I haven't been using Alteryx that long and keep seeing the Regex expressions. I will use the support materials to try to get my head around it. If you don't mind me asking, have you got any suggestions/ tips to help me do that?

CraigC_RG
6 - Meteoroid

Hi @FinnCharlton I just noticed a slight issue in the Parsing tool of your workflow. In the "Detail" column, if there is only null value i.e. Record 21, then both new columns display a null value. As a result the totals are incorrect. Any suggestions as to how to replace the null values in the Detail column with "0"?

CraigC_RG
6 - Meteoroid

Sorry I meant Record 28

FinnCharlton
13 - Pulsar

@CraigC_RG very good point, have amended the RegEx to avoid that:Screenshot 2023-06-26 141245.png

Labels