Thank you. I got your idea and i changed the format now it is working... %macro order_internet(month, year); data new; set wombat.order_fact end=enof; where month(Order_date) =&month and year(Order_date)=&year; if order_type =3 then count +1; if eof =1 and count>0 then do; call symputx('title','Some Internet Orders'); call symputx('count',count); end; else if eof = 1 and count = 0 then do; call symputx('title','No internet Orders'); call symputx('count',0); end; run; title "&title"; title2 "Total Internet Orders are &count"; proc print data = new; run; %mend; %order_internet(2,2007) %order_internet(4,2007)
... View more