Character Count
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi everyone
I am using Length to count characters in a single column but it errors - what am i doing wrong ?
Any help appreciated.
Many thanks
- Labels:
- Data Investigation
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Birdman1971 Can you post a screenshot of the error message your getting and your function configuration?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
The error you're encountering when using the Length function in Alteryx could be due to a few common reasons. Here are some things to check:
Data Type: Ensure that the column you are trying to measure the length of is a string (text) data type. The Length function works on string fields. If your column is of a different type (e.g., numeric or date), you'll need to convert it to a string using the ToString() function first.
Example:
Length(ToString([YourColumn]))Null Values: If there are null values in your column, the Length function might throw an error. You can handle nulls by using the IF function to replace them with an empty string or another value.
Example:
Length(IF IsNull([YourColumn]) THEN "" ELSE [YourColumn] ENDIF)Formula Syntax: Ensure that the syntax of your formula is correct. The formula should be structured as:
Length([YourColumn])Special Characters: If your data includes special characters or unexpected data, this might cause an issue. Ensure that the data is clean and consistent.
If you check these areas and still face issues, could you provide more details on the specific error message you're getting?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks Deano - sometimes the obvious is the one we ignore !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks Deano !
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi Birdman1971, If you're encountering errors while using the Length function in your current method to count characters, it might be worth double-checking the data formatting or function usage. That said, if you're looking for a simpler solution, you can try this free tool: pdf character counter. This tool allows you to upload text or PDF files, and it instantly calculates the character count, including or excluding spaces. If your data can be exported as a text or PDF file, this might save you a lot of hassle! Let me know if you need further assistance. Best regards,
Eliana Crooz
