I am trying to create a FixedDecimal field from an existing FixedDecimal field if another field equals a certain value
I am fairly new to Alteryx and cannot determine what I am doing wrong.
I just want to create a 2nd field from the original field 'WAGE_AMOUNT'
Solved! Go to Solution.
Hi @vern
Change Else "" to Else Null()
IF [PAY_SUM_GRP] = "HO1"
THEN [WAGE_AMOUNT]
ELSE Null()
ENDIF
"" is a string datatype hence its creating error. Null() is datatype independent which leaves the value blank.
Hope this helps : )
Hi @vern
I think your issue comes from the ELSE statement. you're trying to create a numeric field therefore you want to make sure that the condition you state also match a numerical condition. Assuming [WAGE_AMOUT] is a numeric field, therefore replacing the quotes by a 0 would make more sense.
Thx
The only remaining issue is when I use the sum function in Excel to total the original field I get a valid total; however, when I use the sum function to total the new field I get a total of 0?
Hi @vern
You can change it to 0 instead of Null() that way total wont be impacted.
IF [PAY_SUM_GRP] = "HO1"
THEN [WAGE_AMOUNT]
ELSE 0
ENDIF
If you give us info on the complete usecase we can help you out with the best possible option 🙂