I thought I did my best to explain my problem but not enough for you. Here , I will give it another shot. Below is my full code with all the brands like Nike, Adidas etc data all_uk_ts;
input V10101 2. +1 co_nike 1. +1 co_Adidas 1. +1 co_Reebok 1. +1 co_Bat 1.;
Datalines; 11 1 1 2 2
11 1 2 1 1
11 2 2 1 2
11 1 2 1 1
11 1 2 2 1
11 2 1 2 2
11 1 1 1 1
11 2 2 2 2
11 2 2 2 1
11 1 1 1 1
12 1 2 1 1
12 2 2 1 2
12 1 1 1 1
12 1 1 1 1
12 2 1 2 2
12 1 1 1 1
12 2 2 2 2
12 1 1 1 1
12 1 1 1 1
;
run;
proc print data=all_uk_ts;
run;
proc format;
value for_ownership
1='Owners'
2='Nonowners';
value for_country
11='UK'
12='GE';
run;
proc tabulate data=all_uk_ts format=10.0;
format co_nike -- co_Bat for_ownership. v10101 for_country.;
class co_nike co_Adidas co_Reebok co_Bat v10101;
tables co_nike co_Adidas co_Reebok co_Bat,v10101;
run; My Above code gives below output However , the output that I am looking for is the one without 'Nonowners' rows in the above output. I hope this explains.
... View more