Alteryx Designer Desktop Discussions

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

question: String from dataset

xspunky
7 - Meteor

Hi, I am trying to grab several strings from a dataset, however, I am not sure which tool does that. Would I use the formula tool to grab the string from the dataset? For example in one column, I have 9 words in the string, I would like to grab the first 7 words in the string, how would I go about doing that? Please advise, thank you.

2 REPLIES 2
Felipe_Ribeir0
16 - Nebula

Hi @xspunky 

 

unfortunately Alteryx does not have a built in function that could easily extract the first n words of a sentence, so the usual way to do this using Alteryx is by using regex or spliting the phrases based on spaces to delimit words. Both approachs can be seem on the attached example

 

Felipe_Ribeir0_0-1672859991565.png

 

xspunky
7 - Meteor

thank you so much Felipe, I was able to figure out the question from your formula Countwords([String]). I did not know that was one of the formulas for the formula tool. 

Again thank you. 

Labels