Alteryx Designer Desktop Discussions

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

Calculate string length and store it into new column

fogellnagel
5 - Atom

Hey, I'm pretty new to Alteryx and I'd like to calculate the length of each row in a string column and save it to a new column. I don't know if that's even possible using Alteryx, but the file is so large it renders Excel out as possibility.

 

Every tip is highly appreciated!

6 REPLIES 6
Kenda
16 - Nebula
16 - Nebula

Hey @fogellnagel!

 

This is definitely possible with Alteryx! Simply add a Formula tool, create a new output column and name it whatever you'd like then use the following expression:

Length([Field1])

where Field1 is the name of the field you want the length of.

 

length formula.PNG

fogellnagel
5 - Atom

Aah that's easy, thank you very much!

RNG
8 - Asteroid

Hi,

 

I am new to Alteryx and I would like to get the string length (Field2) which is grouped by year (Field1) and store it in a new column (Field 3). Post which I would like to get an average of Field 3 and store in a new column. The output should be year wise average string length

Field 1: 2013, 2014, 2015....... (upto 7years)

Field 2: strings of varying length (700 line items)

Please help me accomplish this.

 

Thanks for your support in advance.

Kenda
16 - Nebula
16 - Nebula

@RNG 

 

See the attached workflow. After you create a new field with the length of Field2 using your Formula tool, you'll need the Summarize tool. I provided two different options as I wasn't exactly sure what you wanted your output to look like. The left stream finds the average of Field2 by year and the right stream just finds the average of all of Field2.

 

Hope this helps!

RNG
8 - Asteroid

Hi Kenda,

 

I got exactly what was required. Thanks much for your help.

avisingh96
7 - Meteor

Hi Community, 

 

Is there any possible way to count the number of characters in a word.

 

Thanks in advance. 

Labels