We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Getword() and the Countword()

mxledesma
7 - Meteor

 I am doing the Try it exercise of the Formula Tool Can anyone explain to me why

 

Formula - GetWord([Address], CountWords([Address])-1) within the Formula tool.

I just dont understand why within Countwords the string has Address and a -1. Why -1. If i omit

the -1 it gives a parse error.

 

10 REPLIES 10
hmdawood
5 - Atom

Because CountWord reflects number of words. Here it means 4 words in the [Address]. 
When I put "-1", it reduces the number to 3.

GetWord counts from 0. So for GetWord to pick the last word it needs to be reduced by 1. Same like function LEFT(), RIGHT() and LEN() combination in excel.

Labels
Top Solution Authors