I have a very simple piece of code, when months_in_arrears_expo >= 3 then make testing2 = 1. It works for 2/3 rows but for some reason not working on the 3rd one.
data test2;
set test;
if (MONTHS_IN_ARREARS_EXPO>= 3) then testing2 =1;
run;
I firstly thought it was due to a rounding issue, so I've multiplied it by 10000000000 but still looks like >= 3 should work.
ACC_NO Months_In_Arrears_Expo testing2 MIA
001 3 . 30000000000
002 3 1 30000000000
003 3 1 30000000000
Use the ROUND() function. If you expect it to be an integer use ROUND(...,1). Otherwise specify the number of decimal places of accuracy you want to keep. For example to round to the nearest one hundredth use ROUND(...,0.01).