Alteryx Designer Desktop Discussions

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

Malformed function call error

hegdepavithra10
9 - Comet

if [Right_RecordID] = 8 then
if ToNumber([A]) = ToNumber([Row-1:A])+ToNumber([Row-6:A] AND ToNumber(TrimRight(ToString([A]),"%"))>=10 then "Pass"
elseif ToNumber([A]) = ToNumber([Row-1:A])+ToNumber([Row-6:A] and ToNumber(TrimRight(ToString([A]),"%"))<10 then "Threshold Breach"
elseif ToNumber([A]) != ToNumber([Row-1:A])+ToNumber([Row-6:A] and ToNumber(TrimRight(ToString([A]),"%"))>=10 then "Exception"
else "Threshold breach & Exception" ENDIF

 

when using the above formula in multi row formula I am getting the malformed function call error. In a column A. in row 8 the value needs to checked for2 conditions.

1. If it is greater than 10%

2. if it is a sum of row-1 and row-6

There are 4 conditions based on combinations

13 REPLIES 13
atcodedog05
22 - Nova
22 - Nova

Hi @hegdepavithra10 

 

It was missing the outer else and Endif

if [Right_RecordID] = 8 then
if ToNumber([A]) = ToNumber([Row-1:A])+ToNumber([Row-6:A] AND ToNumber(TrimRight(ToString([A]),"%"))>=10 then "Pass"
elseif ToNumber([A]) = ToNumber([Row-1:A])+ToNumber([Row-6:A] and ToNumber(TrimRight(ToString([A]),"%"))<10 then "Threshold Breach"
elseif ToNumber([A]) != ToNumber([Row-1:A])+ToNumber([Row-6:A] and ToNumber(TrimRight(ToString([A]),"%"))>=10 then "Exception"
else "Threshold breach & Exception" ENDIF
else Null() ENDIF

 

Can you please check and let me know 🙂 

messi007
15 - Aurora
15 - Aurora

@hegdepavithra10,

 

Please see below:

 

if [Right_RecordID] = 8 then
if ToNumber([A]) = ToNumber([Row-1:A])+ToNumber([Row-6:A] AND ToNumber(TrimRight(ToString([A]),"%"))>=10 then "Pass"
elseif ToNumber([A]) = ToNumber([Row-1:A])+ToNumber([Row-6:A] and ToNumber(TrimRight(ToString([A]),"%"))<10 then "Threshold Breach"
elseif ToNumber([A]) != ToNumber([Row-1:A])+ToNumber([Row-6:A] and ToNumber(TrimRight(ToString([A]),"%"))>=10 then "Exception"
else "Threshold breach & Exception" ENDIF

else "Threshold breach & Exception"

endif

 

Could you share the input data or the workflow in order to help,

 

Regards,

hegdepavithra10
9 - Comet

Hi @atcodedog05 

 

Added the same still same issue. When i click on the go next to the error, it points to the second "then" in the statement

atcodedog05
22 - Nova
22 - Nova

Hi @hegdepavithra10 

 

Can you provide some sample data. So that i can use to fix the formula.

hegdepavithra10
9 - Comet

Hi @atcodedog05 @messi007 

 

hegdepavithra10_0-1606413121889.png

 

the formula written must be outputed to the 8th row of comments column

atcodedog05
22 - Nova
22 - Nova

Hi @hegdepavithra10 

 

Here is a workflow for the task.

Output:

atcodedog05_0-1606413318186.png

Formula:

if [RecordID] = 8 then
if ToNumber([A]) = ToNumber([Row-1:A])+ToNumber([Row-6:A]) AND ToNumber(TrimRight(ToString([A]),"%"))>=10 then "Pass"
elseif ToNumber([A]) = ToNumber([Row-1:A])+ToNumber([Row-6:A]) and ToNumber(TrimRight(ToString([A]),"%"))<10 then "Threshold Breach"
elseif ToNumber([A]) != ToNumber([Row-1:A])+ToNumber([Row-6:A]) and ToNumber(TrimRight(ToString([A]),"%"))>=10 then "Exception"
else "Threshold breach & Exception" ENDIF
else Null() ENDIF

Workflow:

atcodedog05_1-1606413350391.png

 

Hope this helps 🙂 Feel to ask if you have any questions


If this post helps you please mark it as solution. And give a like if you dont mind 😀👍

atcodedog05
22 - Nova
22 - Nova

Hi @hegdepavithra10 

 

Another issue was Tonumber() bracket was not closed

atcodedog05_0-1606413424507.png

 

hegdepavithra10
9 - Comet

Wow, It was the brackets. Thank you.

atcodedog05
22 - Nova
22 - Nova

Happy to help 🙂 @hegdepavithra10 

 

Cheers and Happy Analyzing 😀

 

Feel free to reach out if you face any issues 🙂

Labels