Alteryx Designer Desktop Discussions

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

Data type issues

pangersandmash
8 - Asteroid

Hello, I have a formula tool calculating some new columns. I have an error message as the data type is not compatible. (see screenshot attached).

 

From 'target price' down the Data type box is faded out so i cannot click into it and change the type. 

 

I believe the 'discretionary discount' is the error as the penultimate formula it is output as V_WString data. 

 

The formula:

Target price = double

Discretionary discount % = double (I checked at the join tool just before).

 

It all checks out to be double but is pulling the V_WString for that column and won't let me change it. 

 

Can anyone please guide me? Any help will be really appreciated!!

8 REPLIES 8
JosephSerpis
17 - Castor
17 - Castor

Hey @pangersandmash if you use the function ToNumber around the field Discretionary discount in your last formula it will convert the data type within that function and should remove the error. Note using that function will not permanently change the data type in the workflow. 

pangersandmash
8 - Asteroid

Hi @JosephSerpis Thank you for coming back to me on this. I forgot to mention i actually tried that. screen shot attached. still no luck 😞

JosephSerpis
17 - Castor
17 - Castor

Hi @pangersandmash you need to use that function in your last formula Full Price GBP on the Discretionary discount field. The reason it's doesn't work in your screenshot is that conversion is happening at that formula and it returns to a string field in the formula below.

pangersandmash
8 - Asteroid

Genius- thanks so much!

pangersandmash
8 - Asteroid

@JosephSerpis 

Having a similar issue that I can't make sense of. Can't join data due to the type. V string on the left, double on the right. 

I have tried-

'to number' (see screenshot)

Select tool and change data type : it goes red with error

Changing the double to string with 'tostring'.

 

Can you please help?

JosephSerpis
17 - Castor
17 - Castor

Hi @pangersandmash that approach won't work as after the formula tool that field remains a string field. The conversion within the formula tool only work in that specific function where you use them and does not permanently change the datatype of that field. You need to use a Select tool before the join and change the datatype and then it will work.

pangersandmash
8 - Asteroid

pangersandmash_0-1622040206581.png

it didn't like that either 😞 ^

JosephSerpis
17 - Castor
17 - Castor

If the join tool has the same error message as before I would suggest you put a select tool on the other input and ensure the datatype is not a string.

Labels