I have a dataset of 5 string columns. I want to find out the length of each row n save the length in new column...
Awaiting for response..!
Hi @Jazzy
Alteryx has an expression Length() that provides the length of a string. If you use this 5 times and add them together, you should get what you're looking for. For example,
Length([Field1]) + Length([Field2]) + Length([Field3]) + Length([Field4]) + Length([Field5])
Hope that helps!
Hey @Jazzy !
You want to save the lengths in only one column or in one column for each one?
all in one column can do like @Kenda said, if you want one length column to each one, can use length([Current_field]) in multi-field formula marking only that columns you want to do the lenght, the final result will be 5 new columns, each one with the respective length of the originals.
hope that helps!
Yup ..Thanks....Ur response is highly appreciated....Since I m new in alteryx ....I m bit confused...
I'll post the question ..If possible just guide me...
Make an input dataset with 5-7 string fields. Output the longest record in each of those fieldsalong with their respective lengths. Save the output in a CSV file. Output must be in the belowformat:
Field Name Longest Record Length
For education purposes and in context to what the two answers above explained, you can do it fairly quickly. I attached two different ways you can accomplish this, a manual (formula adding all 5 fields) or a more dynamic way of doing it. The dynamic way comes in handy if you ever needing to do something like this and does not want to type Column1+Column2+Column3 ....
Pedro.
TYSM ..I'll try this.