Hi. So I am working on a hughe database on a secure server. why I can not copy-pasty codes into the browser.
anyways as I am working with health economics I need to multiply all results with a year factor.
so for instance I made a variable totalmedicine I get a number and then if it comes from 2014 I have to multiply that number with 1.083 to get the equivalent amount in 2020. I have to do that for all years 2014-2019.
then I make a code
data allst3;
set all;
totalmedicin=eksp+tilpris;
if eksd >20131231 and eksd<20150101 then totalmedicin=totalmedicin*1.083;
run;
And so on for all the years and factors
when I run the code with or without the if then statement I get the same results in totalmedicin, what am I doing wrong?