Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Replace if length equals...

aconner
6 - Meteoroid

I want to replace all fields in my document that only have one character. I know I want to use the Multi-Field Formula. How can I write an if, then statement for this?

6 REPLIES 6
michael_treadwell
ACE Emeritus
ACE Emeritus

Are you looking to remove all columns that have length 1? Or are you looking to find all values in a data set that are of character length 1 and perform an action on them?

michael_treadwell
ACE Emeritus
ACE Emeritus

The attached module look at all fields in your data set at replace the entries on length 1 with NULL. Is that what you are looking to do? This example module assumes all fields will be strings or numeric. If this isn't the case with your data set, you may need multiple Multi-Field tools but the idea remains the same.

 

The Multi-Field Formula will be configured like this

 

Capture.PNG

 

 

aconner
6 - Meteoroid

I'm looking to find values that ore a length of one character, and delete those fields.

michael_treadwell
ACE Emeritus
ACE Emeritus

The above post should find all values of length 1 and "delete" them by changing them to null.

JordanB
Alteryx
Alteryx

Hi,

 

There is no way of directly deleting those null cells, however one way to remove them from your workflow is by transposing the data and then filtering based on the value field for Null values. You can then return the data back to it's original format by using the crosstab tool.

 

See the attached workflow for an example.

 

Best,

 

Jordan Barker

Client Service Reprentative 

aconner
6 - Meteoroid

This works splendidly! Thank you :)

Labels