Alteryx Designer Desktop Discussions

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

Formula error

AhanaR
7 - Meteor

Hi team,

 

could someone help me correct the error in this formula? I'm trying to convert final currency values into USD using plan rates .

I tried converting all values in decimal fixed as it was giving me errors related to string values.

 

Data set 1:

Final Price CurrencyFinal Price
USD0
INR14000
IDR67000
AUD77122

 

 

Dataset 2:

 

Currency codePlan RatesMarket Convention
IDR15585I
AUD0.6696D
INR82.821I

 

 

IF [Final Price Currency]="USD"
THEN [Final Price]
ELSEIF [Market Convention]="I"
THEN [Final Price]/[Plan rates]
Else [Final Price]*[Plan rates]
ENDif

 

AhanaR_0-1679389535447.png

 

 

2 REPLIES 2
FinnCharlton
13 - Pulsar

Hi @AhanaR , this error is due to a mismatch of data types - one of your numeric fields is set as a string. Put a select tool before the formula tool and ensure your numeric fields are a numeric data type, such as Double. Hope this helps!

binuacs
20 - Arcturus

@AhanaR as @FinnCharlton mentioned the error might be because of the datatype issue, you can also change the datatype in the Join tool

 

binuacs_0-1679391011202.png

 

Labels