Alteryx Designer Desktop Discussions

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

Specify data type for multiple columns with empty cells

Ying
6 - Meteoroid

Hi,

 

Sometimes my dataset has fields (entire columns) that are empty/null which is acceptable.  At times, Alteryx incorrectly thinks these columns contain string data (V_String) when it should be numerical (Double) like "Price", or date (Date) and vice versa.  This becomes a problem when I'm using the join tool to compare records as I get the error "String fields can only be joined to other string fields". 

Besides using formula tool to convert every specified field to either string, double, or date format in case the entire column is empty/null, is there a more efficient way to do this for multiple fields especially when I have many fields that could have empty/null cells?  

 

Hope the above makes sense.

 

Thanks.

2 REPLIES 2
patrick_digan
17 - Castor
17 - Castor

@Ying Are the fields static/known ahead of time? If so, you can try using a select tool. If your data is all the correct type in your sample (or whatever data is in there currently), you can use a select tool and select the forced option:

patrick_digan_0-1634846907477.png

Then if it comes through as a string, it will remain the correct type.

 

If that doesn't work for some reason, perhaps a multi-field formula tool could fix multiple fields at once. 

Ying
6 - Meteoroid

Thanks @patrick_digan this worked for me.  I didn't notice the forced option in the select tool before!

Labels