Hi Alteryx Community,
I'm Quims and new to Atlteryx, i would like to seek an advise on how to place IFs correctly in a formula function.
My Statements are:
If [Revenue] is equal or less than 0 then [Allocation] will be same as [Revenue]
If [Expense] is equal or less than 0 then [Allocation] will be same as [Expense]
If [Revenue] [Expense] is greater than 0 then [Allocation] will calculate based on formula i stated.
Default formula:
([Total Revenue]*[Expense])/[Total Expense]
Thanks in advna
Solved! Go to Solution.
@quims ,
how about trying this:
If [Revenue] <= 0 then [Revenue]
ELSEIF [Expense] <= 0 then [Expense]
ELSEIF [Revenue] > 0 AND [Expense] > 0 then
([Total Revenue]*[Expense])/[Total Expense]
ELSE
Null()
ENDIF
CHEERS,
mark
Hello @quims ,
You can use these:
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Regards
Thank you, @afv2688,
Sorry, this should be my actual results when do it manually.
SN# 1 and 2 is formula by default but when applying it to SN# 3, 4 and 5, shouldn't 0 in Allocation column. I want it to reflect in Allocation column the number from Expense and Revenue if i got 0 results whether in Total Revenue or Total Expense Columns.