This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
Hi Alteryx Team
I have a problem with formulating this IF statement. Basically if the the person is indian, match and above amt of +/-20000000 Then the Age should add by 1.
So I applied the formula and it worked great but when it comes to negative number eg:
and using this in formula tool
IF [Indian]="Yes"AND [Type]="Match"AND [Amt]>=20000000THEN [Age]+1ELSE [Age]+0ENDIF
The output arrives at
while for negative numbers above 20000000 it should add to the age. Like so -
How do I arrive at this output even with negative numbers??
I tried using this formula too but it still doesn't seem to work
IF [Indian]="Yes"AND [Type]="Match"AND [Amt]>=20000000 OR [Amt]>=-20000000THEN [Age]+1ELSE [Age]+0ENDIF
Appreciate your help
I think this should work....
IF [Indian]="Yes"AND [Type]="Match"AND (IIF([Amt]<0,[Amt]*-1,[Amt])) >= 20000000THEN [Age]+1ELSE [Age]ENDIF
I would use following formula.
iif([Indian]="Yes" and ([Amt]>20000000 or [Amt]<-20000000) and ([Type]="Match"), [Age ]+1,[Age ])
In Alteryx, there are almost always multiple ways to do things. I would go with
IF [Indian]="Yes"AND [Type]="Match"AND ABS([Amt]) >= 20000000THEN [Age]+1ELSE [Age]ENDIF