Please keep in mind that when you use macro variables and then run the program, SAS replaces the macro variables with their value. The resulting code must be legal valid working SAS code that does what you want.
So when &CURRENT_YEAR has value 2024 then &CONDITION1 has value 'No 2024 Revenue'. The quotes are part of the string, as is the actual text No 2024 Revenue. I think this is not what you want. Why? Because later your CASE WHEN statement becomes
case when Category in ("'No 2024 Revenue'", "'No Revenue 2024'") then
with the single quotes inside the double quotes. This probably doesn't work, as your character variable CATEGORY probably doesn't have single quotes surrounding the value as part of the text in variable CATEGORY. In general, I would not put macro variables in quotes, as you can see this gets complicated, and the code below probably works better (although since I don't have your data I can't be sure).
%let CONDITION1 = No %sysfunc(compress(&CURRENT_YEAR.)) Revenue;
%let CONDITION2 = No Revenue %sysfunc(compress(&CURRENT_YEAR.));
and when you run the code your CASE WHEN becomes
case when Category in ("No 2024 Revenue", "No Revenue 2024") then
which probably works properly.
General rule: when creating macro variables and assigning them values, do not put macro variables inside single quotes or inside double quotes. When using macro variables, if necessary. put them inside double quotes only (not single quotes).
Also as pointed out, COMPRESS is probably not needed but again I don't have your data so I can't be sure. So without COMPRESS, this simplifies even further to
%let CONDITION1 = No &CURRENT_YEAR. Revenue;
%let CONDITION2 = No Revenue &CURRENT_YEAR.;
... View more