%macro kpi(variable,have_1,have_2,want);
proc sql;
create want have_1 as
select distinct 1 as have_1,sum(&variable) as error
from &have_1;
quit;
proc sql;
create want have_2 as
select distinct 1 as have_2,sum(&variable) as Total
from &have_2;
quit;
proc sql;
create want &want as
select "(I want to select here the name of &variable)", t1.error ,t2.Total, t1.error/t2.Total format=percent8.2 as Pourcentage
from have_1 t1
inner join have_2 t2 on (t1.have_1=t2.have_2);
quit;
proc delete data=have_2 have_1;
run;
%mend; Hello, I want to select the name of column as value.
... View more