Team,
I would like to write an if or IIF statement in the alteryx formula and am unsure how to fix it.
=IF([Extend_Price]<>"",(IF([MultiYearDisc]<>"",IF([ReInst_Fee]<>"",([Extend_Price]+[ReInst_Fee] - [MultiYearDisc]),([Ext_ReinstFee]- [MultiYearDisc])),IF([ReInst_Fee] <>"",([Extend_Price] + [ReInst_Fee]),([Extend_Price])))),"")
Appreciate your help.
Regards,
Alwin
Solved! Go to Solution.
Hi @allwynbazil
Based on the input shared it can achieved in Alteryx with the help of Formula or Multirow tool. That will be based on the dataset and logic to derive the solution.
Could you please share the sample data for columns [Extend_Price] [ReInst_Fee] [MultiYearDisc] [Ext_ReinstFee]
Can figure out the best possible tool (Formula or Multirow tool) to get the result.
Many thanks
Shanker V
I think this does what you need. I've assumed the fields are numerical, so used IsNull rather than <>""
IF IsNull([Extend_Price]) THEN Null()
ELSEIF !IsNull([MultiYearDisc]) AND IsNull([ReInst_Fee]) THEN [Ext_ReinstFee]
ELSE [Extend_Price] ENDIF
+ IIF(IsNull([ReInst_Fee]),0,[ReInst_Fee])
- IIF(IsNull([MultiYearDisc]),0,[MultiYearDisc])
IIF(!isEmpty([Extend_Price]),(IIF(!isEmpty([MultiYearDisc]),IIF(!isEmpty([ReInst_Fee]),([Extend_Price]+[ReInst_Fee] - [MultiYearDisc]),([Ext_ReinstFee]- [MultiYearDisc])),IF([!isEmpty(ReInst_Fee]),([Extend_Price] + [ReInst_Fee]),([Extend_Price])))),Null())
Thanks Chriatina for quick turnaround. Works fine😊
Thanks @binuacs. Solution with IIF here. Appreciate your help.