Hi Alteryx Community,
I have problem in formulating a formula considering the rule of rounding ending in 5 which says that if the digit immediately before the 5 is even, round down (keep the even digit). If the digit before the 5 is odd, round up to the next even number. This is known as round to even or banker's rounding. I am getting a NULL result under Change_Percent2.
example:
1.45 would be rounded to 1.4 (the digit before 5 is even, so round down).
1.55 would be rounded to 1.6 (the digit before 5 is odd, so round up).
Here's my formula:
Change_Percent (String type)
((ToNumber([Total_CurReject]) - ToNumber([Total_LastWReject])) / ToNumber([Total_LastWReject])) * 100
Change_Percent2 (String type)
IF (MOD(ABS(ToNumber([Change_Percent])), 1) = 0.5) THEN
IF (MOD(FLOOR(ABS(ToNumber([Change_Percent]))), 2) = 0) THEN
FLOOR(ABS(ToNumber([Change_Percent])))
ELSE
CEIL(ABS(ToNumber([Change_Percent])))
ENDIF
ELSE
ROUND(ABS(ToNumber([Change_Percent])), 0)
ENDIF

Hoping some to help me solve this problem.
Thanks,
Kamen