Alteryx Designer Desktop Discussions

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

F and T converted to True & False rather than strings

josephhw
6 - Meteoroid

Hi,

 

I'm importing data where some of the fields contain F and T. After looking at it once it's read in some of the values, specifically Fs and Ts, have been converted to True and False. 

 

Is there a recommend way of dealing with this? I've so far gone for selecting it and converting it to a string of size 1 which returns the truncation warning.

 

Is this the best method?

 

Many thanks,

5 REPLIES 5
Thableaus
17 - Castor
17 - Castor

Hi @josephhw 

 

Does your field only contain these strings (F or T)?

Where does your data come from? (Excel File, SQL, CSV)


Cheers,

Thableaus
17 - Castor
17 - Castor

@josephhw 

 

I don't know if this is the best way, but an alternative solution would be converting the Field to a String and using the Formula - Left([Field], 1)

 

Cheers,

 

 

josephhw
6 - Meteoroid

Hey, 

 

Yes the field only contained Fs and Ts! I have had it as an issue doing a raw text input tool and from Excel

Thableaus
17 - Castor
17 - Castor

@josephhw 

 

Yes, you'll definetely have some trouble if you're using the Text Input tool, it will automatically identify the field as a Boolean, and when you convert it back to a String, it sees it as False or True.

 

But the good thing is if you insert a space before or after your F/T string, it sees it as a string again. Then you could use either the Data Cleansing Tool or the Trim function to get rid of this whitespace.

 

Or you could use a dummy string in the 1st row and use the Sample Tool with the Skip 1st option.  

 

Details that can make our life a bit harder.

 

Cheers,

josephhw
6 - Meteoroid

Great! Two easy solutions! 

 

Thanks a lot. Will probably go for the dummy string!

Labels