<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Distinct count of subjects by multiple class variables for cross-tabulation in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Distinct-count-of-subjects-by-multiple-class-variables-for-cross/m-p/554525#M154263</link>
    <description>&lt;P&gt;It's a double proc freq for distinct counts.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do it the first time with the variable you want to count included and then a second time without. Except it doesn't seem like you're actually counting distinct based on the WANT data set. Can you explain why there is no entries/counts for Cancer=0 and Enrolled=1 when you have those in the data? Are you using the assumption that if you have cancer/enrolled that needs to be kept at all? If so, take the max for each cancer/enrolled combo then do the proc freq.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input ID CANCER ENROLLED;
cards;
1   1   1
1   1   1
1   1   1
1   1   1
1   0   1
1   0   1
1   0   1
1   0   1
2   1   0
2   1   0
2   1   0
2   1   0
2   0   0
2   0   0
2   0   0
2   0   0
;

*distinct counts
proc freq data=have noprint;
table cancer*enrolled*id /out = temp;run;

proc freq data=temp;
table cancer*enrolled / out=want;
run;


*what you likely actually want;
proc sql;
create table temp2 as
select id, max(cancer) as cancer, max(enrolled) as enrolled
from have
group by ID;
quit;

proc freq data=temp2;
table cancer*enrolled;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Sat, 27 Apr 2019 22:07:58 GMT</pubDate>
    <dc:creator>Reeza</dc:creator>
    <dc:date>2019-04-27T22:07:58Z</dc:date>
    <item>
      <title>Distinct count of subjects by multiple class variables for cross-tabulation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Distinct-count-of-subjects-by-multiple-class-variables-for-cross/m-p/554500#M154256</link>
      <description>&lt;P&gt;Hi folks,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I'm trying to create a table shown in image which requires distinct counts of patients by class variables (enrolled and cancer and sites). Simple proc freq with class would do if my data was a row per patient. However, my data is repeated and proc sql using distinct functon shown in the code didn't cross-tabulate for me.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I appreciate your time for help. Thanks in advance. &amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My data has:&lt;/P&gt;
&lt;P&gt;enrolled: constant variable for each subjects. takes 0,1. if someone enrolled then enrolled (1) or not enrolled (0) across all rows for each patient&lt;/P&gt;
&lt;P&gt;cancer: a dummy variable (0,1). One patient can take both 0 or 1 for different rows.&lt;/P&gt;
&lt;P&gt;sites: distinct categorical variable for each patient. one patient has only one site.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="table wanted.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/29082i0B8E2BE3F6CEC42A/image-size/large?v=v2&amp;amp;px=999" role="button" title="table wanted.png" alt="table wanted.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;/*failed codes*/
proc freq data=have nlevels;&lt;BR /&gt;class sites;
tables a*b/norow nocol nopercent nocum;
run; 

proc sql; 
SELECT count(distinct ID) as N_PATIENTS,
       CANCER, ENROLLED, SITES 
from HAVE
GROUP BY ENROLLED, CANCER, SITES; 
quit;

/*mock data*/
&lt;/CODE&gt;&lt;BR /&gt;DATA HAVE;&lt;BR /&gt;INPUT ID CANCER enrolled SITES $;&lt;BR /&gt;CARDS;&lt;BR /&gt;1 0 1 Lung&lt;BR /&gt;1 1 1 Lung&lt;BR /&gt;2 0 1 Liver&lt;BR /&gt;2 0 1 Liver&lt;BR /&gt;2 1 1 Liver&lt;BR /&gt;3 0 1 Lung&lt;BR /&gt;3 1 1 Lung&lt;BR /&gt;4 0 1 Cervix&lt;BR /&gt;4 0 1 Cervix&lt;BR /&gt;4 1 1 Cervix&lt;BR /&gt;5 0 0 Anus&lt;BR /&gt;6 0 1 Thyroid&lt;BR /&gt;6 1 1 Thyroid&lt;BR /&gt;7 0 1 CNS&lt;BR /&gt;7 1 1 CNS&lt;BR /&gt;8 0 1 Prostate&lt;BR /&gt;8 1 1 Prostate&lt;BR /&gt;8 1 1 Prostate&lt;BR /&gt;9 0 1 Breast&lt;BR /&gt;9 1 1 Breast&lt;BR /&gt;10 0 1 Breast&lt;BR /&gt;10 1 1 Breast&lt;BR /&gt;11 0 0 Thyroid&lt;BR /&gt;11 0 0 Thyroid&lt;BR /&gt;11 0 0 Thyroid&lt;BR /&gt;12 0 1 Kidney&lt;BR /&gt;12 1 1 Kidney&lt;BR /&gt;13 0 1 CNS&lt;BR /&gt;13 0 1 CNS&lt;BR /&gt;13 1 1 CNS&lt;BR /&gt;14 0 1 Prostate&lt;BR /&gt;14 1 1 Prostate&lt;BR /&gt;;&lt;BR /&gt;&amp;nbsp;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Apr 2019 22:49:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Distinct-count-of-subjects-by-multiple-class-variables-for-cross/m-p/554500#M154256</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2019-04-27T22:49:33Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct count of subjects by multiple class variables for cross-tabulation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Distinct-count-of-subjects-by-multiple-class-variables-for-cross/m-p/554525#M154263</link>
      <description>&lt;P&gt;It's a double proc freq for distinct counts.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Do it the first time with the variable you want to count included and then a second time without. Except it doesn't seem like you're actually counting distinct based on the WANT data set. Can you explain why there is no entries/counts for Cancer=0 and Enrolled=1 when you have those in the data? Are you using the assumption that if you have cancer/enrolled that needs to be kept at all? If so, take the max for each cancer/enrolled combo then do the proc freq.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input ID CANCER ENROLLED;
cards;
1   1   1
1   1   1
1   1   1
1   1   1
1   0   1
1   0   1
1   0   1
1   0   1
2   1   0
2   1   0
2   1   0
2   1   0
2   0   0
2   0   0
2   0   0
2   0   0
;

*distinct counts
proc freq data=have noprint;
table cancer*enrolled*id /out = temp;run;

proc freq data=temp;
table cancer*enrolled / out=want;
run;


*what you likely actually want;
proc sql;
create table temp2 as
select id, max(cancer) as cancer, max(enrolled) as enrolled
from have
group by ID;
quit;

proc freq data=temp2;
table cancer*enrolled;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Apr 2019 22:07:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Distinct-count-of-subjects-by-multiple-class-variables-for-cross/m-p/554525#M154263</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-04-27T22:07:58Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct count of subjects by multiple class variables for cross-tabulation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Distinct-count-of-subjects-by-multiple-class-variables-for-cross/m-p/554526#M154264</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I was just staring at this forum where you offered similar appraoch. Let me look at your suggestion to my post here. I'll get back to you asap. Thanks for responding me on weekend!&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Programming/PROC-FREQ-with-nodupkey/td-p/389788" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/PROC-FREQ-with-nodupkey/td-p/389788&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Apr 2019 22:14:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Distinct-count-of-subjects-by-multiple-class-variables-for-cross/m-p/554526#M154264</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2019-04-27T22:14:50Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct count of subjects by multiple class variables for cross-tabulation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Distinct-count-of-subjects-by-multiple-class-variables-for-cross/m-p/554529#M154265</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Reeza thanks for a pointer. I have all combinations of cancer*enrolled. Attached image is the desired table.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="table wanted.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/29081i6174355085FF6242/image-size/large?v=v2&amp;amp;px=999" role="button" title="table wanted.png" alt="table wanted.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;DATA HAVE;
INPUT ID CANCER	enrolled SITES $;
CARDS;
1	0	1	Lung
1	1	1	Lung
2	0	1	Liver
2	0	1	Liver
2	1	1	Liver
3	0	1	Lung
3	1	1	Lung
4	0	1	Cervix
4	0	1	Cervix
4	1	1	Cervix
5	0	0	Anus
6	0	1	Thyroid
6	1	1	Thyroid
7	0	1	CNS
7	1	1	CNS
8	0	1	Prostate
8	1	1	Prostate
8	1	1	Prostate
9	0	1	Breast
9	1	1	Breast
10	0	1	Breast
10	1	1	Breast
11	0	0	Thyroid
11	0	0	Thyroid
11	0	0	Thyroid
12	0	1	Kidney
12	1	1	Kidney
13	0	1	CNS
13	0	1	CNS
13	1	1	CNS
14	0	1	Prostate
14	1	1	Prostate
;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;CODE class=" language-sas"&gt;
&lt;/CODE&gt;&lt;/P&gt;</description>
      <pubDate>Sat, 27 Apr 2019 22:39:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Distinct-count-of-subjects-by-multiple-class-variables-for-cross/m-p/554529#M154265</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2019-04-27T22:39:41Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct count of subjects by multiple class variables for cross-tabulation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Distinct-count-of-subjects-by-multiple-class-variables-for-cross/m-p/554532#M154266</link>
      <description>You need to answer this question based on your smaller example: Can you explain why there is no entries/counts for Cancer=0 and Enrolled=1 when you have those in the data?</description>
      <pubDate>Sat, 27 Apr 2019 22:36:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Distinct-count-of-subjects-by-multiple-class-variables-for-cross/m-p/554532#M154266</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-04-27T22:36:58Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct count of subjects by multiple class variables for cross-tabulation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Distinct-count-of-subjects-by-multiple-class-variables-for-cross/m-p/554533#M154267</link>
      <description>smaller example is a bad example which doesn't reflect my true data. i have enrolled 0,1 vs cancer 0,1 this all combinations of these.</description>
      <pubDate>Sat, 27 Apr 2019 22:40:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Distinct-count-of-subjects-by-multiple-class-variables-for-cross/m-p/554533#M154267</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2019-04-27T22:40:54Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct count of subjects by multiple class variables for cross-tabulation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Distinct-count-of-subjects-by-multiple-class-variables-for-cross/m-p/554534#M154268</link>
      <description>Reeza, I edited my post. Now mock data reflects my actual data.</description>
      <pubDate>Sat, 27 Apr 2019 22:50:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Distinct-count-of-subjects-by-multiple-class-variables-for-cross/m-p/554534#M154268</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2019-04-27T22:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct count of subjects by multiple class variables for cross-tabulation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Distinct-count-of-subjects-by-multiple-class-variables-for-cross/m-p/554553#M154274</link>
      <description>&lt;P&gt;One of the options I posted should work then. Do they not? If not, how so?&lt;/P&gt;</description>
      <pubDate>Sun, 28 Apr 2019 02:04:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Distinct-count-of-subjects-by-multiple-class-variables-for-cross/m-p/554553#M154274</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-04-28T02:04:55Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct count of subjects by multiple class variables for cross-tabulation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Distinct-count-of-subjects-by-multiple-class-variables-for-cross/m-p/554556#M154275</link>
      <description>Reeza, none of them give me an organized table shown in image. I'm wondering about combining the first proc freq with proc tabulate instead the second proc freq. What do you think?</description>
      <pubDate>Sun, 28 Apr 2019 02:16:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Distinct-count-of-subjects-by-multiple-class-variables-for-cross/m-p/554556#M154275</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2019-04-28T02:16:44Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct count of subjects by multiple class variables for cross-tabulation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Distinct-count-of-subjects-by-multiple-class-variables-for-cross/m-p/554597#M154294</link>
      <description>This looks like a simple case of 1 proc tabulate using define across</description>
      <pubDate>Sun, 28 Apr 2019 15:45:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Distinct-count-of-subjects-by-multiple-class-variables-for-cross/m-p/554597#M154294</guid>
      <dc:creator>smijoss1</dc:creator>
      <dc:date>2019-04-28T15:45:38Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct count of subjects by multiple class variables for cross-tabulation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Distinct-count-of-subjects-by-multiple-class-variables-for-cross/m-p/554601#M154297</link>
      <description>&lt;P&gt;Thank &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Programming/PROC-Tabulate-displaying-counts-and-percentages-with-multiple/td-p/319554" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/PROC-Tabulate-displaying-counts-and-percentages-with-multiple/td-p/319554&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc format;
value   Cancer_Fmt  
0 = 'Cancer=0'
1 = 'Cancer=1' ;


value   Enroll_Fmt  
0 = 'Enrolled=0'
1 = 'Enrolled=1' ;

picture ColPCnt other='009.99%';
run;

proc tabulate data=HAVE;
class sites cancer enrolled;
table sites  all, all*(n='#' colpctn='Col%'*f=ColPCnt.) CANCER='' * (all*(n='#' colpctn='Col%'*f=ColPCnt.) enrolled='' * (n='#' colpctn='Col%'*f=ColPCnt.)) ;
format cancer Cancer_Fmt. enrolled Enroll_Fmt.;
Run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;output :&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image.png" style="width: 563px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/29086i06AF84287BAE1809/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="image.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 28 Apr 2019 16:36:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Distinct-count-of-subjects-by-multiple-class-variables-for-cross/m-p/554601#M154297</guid>
      <dc:creator>smijoss1</dc:creator>
      <dc:date>2019-04-28T16:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct count of subjects by multiple class variables for cross-tabulation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Distinct-count-of-subjects-by-multiple-class-variables-for-cross/m-p/554602#M154298</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/144921"&gt;@smijoss1&lt;/a&gt;&amp;nbsp;@Cynthia_sas &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13879"&gt;@Reeza&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you very much!!!! I greatly appreciate your time.&lt;/P&gt;</description>
      <pubDate>Sun, 28 Apr 2019 16:54:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Distinct-count-of-subjects-by-multiple-class-variables-for-cross/m-p/554602#M154298</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2019-04-28T16:54:21Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct count of subjects by multiple class variables for cross-tabulation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Distinct-count-of-subjects-by-multiple-class-variables-for-cross/m-p/554606#M154300</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/144921"&gt;@smijoss1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Applied neatly to my actual data. May I ask one more question please? Do you know how to control the order of columns appear in the table by any chance?&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="change order in table.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/29087i7717F5266F570DCE/image-size/large?v=v2&amp;amp;px=999" role="button" title="change order in table.png" alt="change order in table.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 28 Apr 2019 17:20:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Distinct-count-of-subjects-by-multiple-class-variables-for-cross/m-p/554606#M154300</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2019-04-28T17:20:30Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct count of subjects by multiple class variables for cross-tabulation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Distinct-count-of-subjects-by-multiple-class-variables-for-cross/m-p/554607#M154301</link>
      <description>What is your order</description>
      <pubDate>Sun, 28 Apr 2019 17:50:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Distinct-count-of-subjects-by-multiple-class-variables-for-cross/m-p/554607#M154301</guid>
      <dc:creator>smijoss1</dc:creator>
      <dc:date>2019-04-28T17:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct count of subjects by multiple class variables for cross-tabulation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Distinct-count-of-subjects-by-multiple-class-variables-for-cross/m-p/554612#M154304</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/144921"&gt;@smijoss1&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;as shown in the image below&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="change order in table.png" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/29088i49D5F315C2A0CD7F/image-size/large?v=v2&amp;amp;px=999" role="button" title="change order in table.png" alt="change order in table.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 28 Apr 2019 18:17:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Distinct-count-of-subjects-by-multiple-class-variables-for-cross/m-p/554612#M154304</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2019-04-28T18:17:22Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct count of subjects by multiple class variables for cross-tabulation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Distinct-count-of-subjects-by-multiple-class-variables-for-cross/m-p/554613#M154305</link>
      <description>&lt;P&gt;read up on proc tabulate order=formatted.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;class sites cancer enrolled / order=formatted;

OR 

class sites ;
class cancer / order=formatted;
class enrolled / order=formatted;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 28 Apr 2019 18:30:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Distinct-count-of-subjects-by-multiple-class-variables-for-cross/m-p/554613#M154305</guid>
      <dc:creator>smijoss1</dc:creator>
      <dc:date>2019-04-28T18:30:02Z</dc:date>
    </item>
    <item>
      <title>Re: Distinct count of subjects by multiple class variables for cross-tabulation</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Distinct-count-of-subjects-by-multiple-class-variables-for-cross/m-p/554615#M154306</link>
      <description>Thank you. The 1st option did the trick.</description>
      <pubDate>Sun, 28 Apr 2019 18:59:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Distinct-count-of-subjects-by-multiple-class-variables-for-cross/m-p/554615#M154306</guid>
      <dc:creator>Cruise</dc:creator>
      <dc:date>2019-04-28T18:59:33Z</dc:date>
    </item>
  </channel>
</rss>

