Hi,
I am trying to create an if statement that has multiple criteria. My syntax is as follows: if [Is Buy/Sell] = "sell" AND if [TRADE_KEYWORD.BO_ProductType] = "FEES_BBL_ACCR" then "1800" else "1300" endif . I am receiving the error "Malformed If Statement". I am sure this is an easy fix and I am missing something every simple.
Solved! Go to Solution.
Hi @grsomer
The formula you have is close. I would use this expression:
if [Is Buy/Sell]="sell" && [TRADE_KEYWORD.BO_ProductType]="FEES_BBL_ACCR" then 1800 else 1300 endif
If the field you're creating is a number, leave it as-is. If you want your new field to be a string, add double quotes around the 1800 and 1300.
Another option, if you want to use the other if statement available in Alteryx would be:
iif([Is Buy/Sell]="sell" && [TRADE_KEYWORD.BO_ProductType]="FEES_BBL_ACCR", 1800, 1300)
This does the same thing just in fewer words.
Hope this helps!