I would use a hash object to look up the value you want.
data last;
last_observation= 4;
call symput("last",last_observation);
run;
data time_id;
input Time ID;
datalines;
34200 1
34201 2
34210 3
34213 4
;;;
run;
data purchases;
input Purchases_unit Time;
datalines;
1000 34200
2000 34210
1243 34211
3040 34300
;;;
run;
%macro loopit(n);
%do i=1 %to &n;
data want_&i(drop=rc);
set purchases;
format time_i best.;
retain time_i id;
if _n_ = 1 then do;
declare hash lookup(dataset:"time_id(rename=(time=time_i))");
rc = lookup.definekey("id");
rc = lookup.definedata("time_i");
rc = lookup.definedone();
id = &i;
rc = lookup.find();
end;
if time >= time_i;
run;
%end;
%mend;
%loopit(&last);
In the first observation, you look up the value from the look up table. Retain that value and use a subsetting if statement.