Hi Tom, Thank you for the tips. Please find below the code which i am trying.. but unable to get the desire results. I have four variables - 1) b5_own has two values ( 0 ,1) 2) AA1 has two values (0 ,1) 3) brand ( has 20 brands) 4) market ( has 10 markets) I have modified your code %macro twoway(varlist); %local i j k l; %do i=1 %to %sysfunc(countw(&varlist,%str( )))-1; %do j=&i+1 %to %sysfunc(countw(&varlist,%str( ))); %do k=1 %to %sysfunc(countw(&varlist,%str( ))); %do l=1 %to %sysfunc(countw(&varlist,%str( ))); %scan(&varlist,&i)*%scan(&varlist,&j)*%scan(&varlist,&k)*%scan(&varlist,&l) %end; %end; %end; %end; %mend; proc freq data=chks; tables %twoway(b5_own aa1 brand market) ; weight weight; run; Can you please guide where the mistake is because i couldnt match the numbers.. Thanks and Regards, S.S.Pradeep
... View more