Hi All
I'm new to my Alteryx journey. I'm trying to automate a process and have this formula written but I keep getting an error on the endif.
Can someone tell me where I am going wrong
if (IsNull([GTH Charge rate]) or IsNull([A])) then "Missing data" else if [GTH Charge rate] = [B] then "Correct" else "Validate" endif
Hi @Dav
Either add a second 'endif' at the end, or change 'else if' to 'elseif'.
Right now the second if is being treated as a new formula, so you have two if statements that need two endif's.
If IsNull([GTH Charge rate]) or IsNull([A]) Then
"Missing data"
ElseIf [GTH Charge rate] = [B] Then
"Correct"
Else
"Validate"
EndIf
Thanks for providing help, I tried both, adding a second ENDIF and changing the 'else if' to 'elseif' still didn't work
Thankyou for your help, I tried your formula and it did not work. At the '=' part it comes up with an "Invalid type in operator ==.)
Can you check your data type of the fields and make sure the fields GTH Charge Rate, A and B are same data type, also can you screen shot your formula tool error
Replace the A and B with the actual data names. I also changed the last else to an Else if and and elseif but still wouldn't work
All fixed now, sorry rookie mistake. One of my data set number wasnt actual a number but was in text format in excel. Just changed it to number and it works