The easiest would be to add the year in the select and the group by statements: proc sql ; select applprovenance, YEAR format=whatever sas date format you want, sum(monoperl) as monoperl label= 'MontantOperation <10000', sum(monoperg) as monoperg label= 'MontantOperation >=10000', sum(monbilll) as monbilll label= 'MontantBilletEspece <10000', sum(monbillg) as monbillg label= 'MontantBilletEspece >=10000' from have2 group by applprovenance, year ; quit; This doesnt create a new variable but adds the year column to the report. If you need the applprovenance and year in the same variable you could combine the two in a new varaible in the datastep: newvar = catx('_',applprovenance,year); You would then replace applprovenance (two times) with the new variable in SQL. Hope this helps! EJ
... View more