Lets look at your logic this way:
COMPUTE DAILY_COMPLLY/P7.1%B =
option 1) IF ( DAILY_TY - DAILY_LY ) / DAILY_LY * 100 GT 100.0 THEN 100.0 ELSE
option 2) IF ( DAILY_TY - DAILY_LY ) / DAILY_LY * 100 GT -100.0 THEN -100.0 ELSE
option 3) ( DAILY_LY_LLY_COMP - DAILY_LLY_COMP ) / DAILY_LLY_COMP * 100; AS ''
example1 : value = 2500.0% --> this falls under option 1 line so the answer will be 100.0%
example2 : value = 50.0% --> this falls under option 2 line so the answer will be -100.0%
example3 : value = -50.0% --> this falls under option 2 line so the answer will be -100.0%
example4 : value = -2500.0% --> this falls under option 3 line so the answer will be the calculation
I believe John is correct and in option 2 line you need to change 'GT' to 'LT' and the result will be:
COMPUTE DAILY_COMPLLY/P7.1%B =
option 1) IF ( DAILY_TY - DAILY_LY ) / DAILY_LY * 100 GT 100.0 THEN 100.0 ELSE
option 2) IF ( DAILY_TY - DAILY_LY ) / DAILY_LY * 100 LT -100.0 THEN -100.0 ELSE
option 3) ( DAILY_LY_LLY_COMP - DAILY_LLY_COMP ) / DAILY_LLY_COMP * 100; AS ''
example1 : value = 2500.0% --> this falls under option 1 line so the answer will be 100.0%
example2 : value = 50.0% --> this falls under option 3 line so the answer will be the calculation
example3 : value = -50.0% --> this falls under option 3 line so the answer will be the calculation
example4 : value = -2500.0% --> this falls under option 2 line so the answer will be -100.0%
All Releases
All OS, All Outputs