Hi All,
i am struggling in this error "resulted in a string but the field is numeric use tonumber" despite the field type as Double in all previous SELECT tools, Also the formula is not provide me the required result, Appreciate your help pls
Solved! Go to Solution.
If you want the data type for field "H1 Payout" to be numeric (double), remove the double quotes around the number at the end of each line of your IF statement.
Your IF statement sets values to String (identified by the double quotes), but you have the data type for the field set to Double.
Chris
remove the " Quotation mark from the formula
Hi @Mostafa_Anwar,
Can you please use the values without quotes as given below and likewise:
If [a]<85 then 0
Thanks for your respond, i have changed but still getting the same error as per the screenshot below
Hi @Mostafa_Anwar , try using this formula
if [H1 Brands Ach.]<.85 then 0
elseif [H1 Brands Ach.]>=.85 then 2736
elseif [H1 Brands Ach.]>=1.20 then 32400 else 0 endif
The reason you are facing this issue is that as I can see in your screenshot you have used numbers which are comma separated and the datatype you used is double, trying changing the data type to v_string then it will work.
Note: Comma separated does not work for double datatype it only works for string.
Error gone, Thanks for your support, But when i checked the output file i have noticed that the formula result is incorrect, As per formula should provide result 32,400 in case of achieved >1.20 but its giving 2,736 as per the screenshot below,
Hi @Mostafa_Anwar, you are facing this error because your second and third condition overlap . Try using the formula with below modification:
if [H1 Brands Ach.]<.85 then 0
elseif [H1 Brands Ach.]>=.85 and [H1 Brands Ach.]<1.20 then 2736
elseif [H1 Brands Ach.]>=1.20 then 32400 else 0 endif
Thanks a lot, It worked!
Formula (689) The formula "Logistica Days" resulted in a string but the field is numeric. Use ToNumber(...) if this is correct. (Expression #1)
I have this error and suggest from alteryx is with ToNumber... but i doesn't work.
If ToNumber([NivelAvance]='Logistica' and [Country]='BRA')
then DateTimeAdd(ToDate(DateTimeNow()),+2,'days')
elseif ToNumber([NivelAvance]='Logistica' and [Country]='ARG')
then DateTimeAdd(ToDate(DateTimeNow()),+2,'days')
else 0
endif
Any suggest?