In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more 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