Hello:
Great Analytics folks. Good afternoon. Is it possible to use a formula tab for this formula:
=IF(C22="Branch",F22-G22-J22+I22,IF(C22="Sub",F22-G22-J22+I22-H22,"error"))
I do not want to use Summary tab at this point.
Appreciate your help.
Solved! Go to Solution.
Hey @Kinetic_analytics,
This looks like an excel formula. In alteryx this would be wrote as:
IIF([C22]="Branch",[F22]-[G22]-[J22]+[I22],IIF([C22]="Sub",[F22]-[G22]-[J22]+[I22]-[H22],"error"))
Two points:
- Change IF to IIF
- Add square brackets to column references
Do you have any example data and a desired output that you can share for context?
Thanks,
Ira
Seems straightforward, just would need to update your cell references with the field names:
IF [C22]='Branch'
Then [F22]-[G22]-[J22]+[I22]
Elseif [C22] = 'Sub'
Then [F22]-[G22]-[J22]+[I22]-[H22]
else "error"
Endif
Since you're else is a string and your other clauses are doing mathematical operations you'll probably run into a data type issue. I'd suggest you share some data.
Thank you. Appreciate your help.