<?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: How to use to crate a Freq table of One variable with multiple variable in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/How-to-use-to-crate-a-Freq-table-of-One-variable-with-multiple/m-p/732375#M28482</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/222563"&gt;@hjjijkkl&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I do want the frequency and the counts in the table&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;What do you mean?&amp;nbsp; I understand frequency and counts to mean the same thing.&lt;/P&gt;</description>
    <pubDate>Thu, 08 Apr 2021 23:45:20 GMT</pubDate>
    <dc:creator>mkeintz</dc:creator>
    <dc:date>2021-04-08T23:45:20Z</dc:date>
    <item>
      <title>How to use to crate a Freq table of One variable with multiple variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-use-to-crate-a-Freq-table-of-One-variable-with-multiple/m-p/732368#M28478</link>
      <description>&lt;P&gt;I want to create one freq table contains&amp;nbsp; (ethnicity gender sex) by ARM.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried the code below but, it is giving me 3 freq tables for each variable with (ARM by ethnicity , ARM by gender and ARM by sex) . Bit, i want one table that contains ARM by&amp;nbsp;ethnicity gender sex.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc freq data=want;&lt;/P&gt;
&lt;P&gt;tables ARm *(ethnicity gender sex);&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Apr 2021 22:34:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-use-to-crate-a-Freq-table-of-One-variable-with-multiple/m-p/732368#M28478</guid>
      <dc:creator>hjjijkkl</dc:creator>
      <dc:date>2021-04-08T22:34:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to use to crate a Freq table of One variable with multiple variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-use-to-crate-a-Freq-table-of-One-variable-with-multiple/m-p/732370#M28479</link>
      <description>&lt;P&gt;Use PROC TABULATE instead or you need to manually massage the output from PROC FREQ in a data step.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc tabulate data=want;
class arm ethnicity gender sex;
table (ethnicity gender sex), arm*N;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If you want percentages look at the examples in the documentation for the correct references on what to specify in the code. FYI - I would have to look it up to answer it for you...it's particular.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is an example of how the manual manipulation of PROC FREQ could work. You would need to modify it very slightly to get it to work for you, I think just the keep statement.&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods output crosstabfreqs=summary;
proc freq data=sashelp.class;
table sex*(_all_);
run;



data long;
	length variable $32. variable_value $50.;
	set summary;
	Variable=scan(table, 2, '*');
	Variable_Value=strip(trim(vvaluex(variable)));
	presentation=catt(frequency, " (", trim(put(percent/100, percent7.1)), ")");
	keep sex variable  variable_value frequency percent presentation;
	label variable='Variable' variable_value='Variable Value';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;And one other option, this macro is quite useful:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Communities-Library/Demographic-Table-and-Subgroup-Summary-Macro-TABLEN/ta-p/634030" target="_blank"&gt;https://communities.sas.com/t5/SAS-Communities-Library/Demographic-Table-and-Subgroup-Summary-Macro-TABLEN/ta-p/634030&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/222563"&gt;@hjjijkkl&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I want to create one freq table contains&amp;nbsp; (ethnicity gender sex) by ARM.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I tried the code below but, it is giving me 3 freq tables for each variable with (ARM by ethnicity , ARM by gender and ARM by sex) . Bit, i want one table that contains ARM by&amp;nbsp;ethnicity gender sex.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;proc freq data=want;&lt;/P&gt;
&lt;P&gt;tables ARm *(ethnicity gender sex);&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&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>Thu, 08 Apr 2021 23:02:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-use-to-crate-a-Freq-table-of-One-variable-with-multiple/m-p/732370#M28479</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-04-08T23:02:42Z</dc:date>
    </item>
    <item>
      <title>Re: How to use to crate a Freq table of One variable with multiple variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-use-to-crate-a-Freq-table-of-One-variable-with-multiple/m-p/732371#M28480</link>
      <description>using the macro might be a lot easier but, i am getting this error in the log. Not sure how to solve it. &lt;BR /&gt; %tablen(data=want, by=arm,&lt;BR /&gt;       -&lt;BR /&gt;       180&lt;BR /&gt;WARNING: Apparent invocation of macro TABLEN not resolved.&lt;BR /&gt;ERROR 180-322: Statement is not valid or it is used out of proper order&lt;BR /&gt;</description>
      <pubDate>Thu, 08 Apr 2021 23:19:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-use-to-crate-a-Freq-table-of-One-variable-with-multiple/m-p/732371#M28480</guid>
      <dc:creator>hjjijkkl</dc:creator>
      <dc:date>2021-04-08T23:19:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to use to crate a Freq table of One variable with multiple variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-use-to-crate-a-Freq-table-of-One-variable-with-multiple/m-p/732372#M28481</link>
      <description>&lt;P&gt;I do want the frequency and the counts in the table&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Apr 2021 23:20:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-use-to-crate-a-Freq-table-of-One-variable-with-multiple/m-p/732372#M28481</guid>
      <dc:creator>hjjijkkl</dc:creator>
      <dc:date>2021-04-08T23:20:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to use to crate a Freq table of One variable with multiple variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-use-to-crate-a-Freq-table-of-One-variable-with-multiple/m-p/732375#M28482</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/222563"&gt;@hjjijkkl&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I do want the frequency and the counts in the table&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;What do you mean?&amp;nbsp; I understand frequency and counts to mean the same thing.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Apr 2021 23:45:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-use-to-crate-a-Freq-table-of-One-variable-with-multiple/m-p/732375#M28482</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2021-04-08T23:45:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to use to crate a Freq table of One variable with multiple variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-use-to-crate-a-Freq-table-of-One-variable-with-multiple/m-p/732385#M28483</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/222563"&gt;@hjjijkkl&lt;/a&gt;&amp;nbsp; - You need to download the macro program and run it before calling it - there is a download link in the Community article.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Apr 2021 01:32:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-use-to-crate-a-Freq-table-of-One-variable-with-multiple/m-p/732385#M28483</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-04-09T01:32:04Z</dc:date>
    </item>
    <item>
      <title>Re: How to use to crate a Freq table of One variable with multiple variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-use-to-crate-a-Freq-table-of-One-variable-with-multiple/m-p/732528#M28490</link>
      <description>&lt;P&gt;Still having error on the log after downloading the macro. I am not familiar with macro. Any other way to have crate frequency table of one to many (x * mult variable)&amp;nbsp; with the results in one table instead of separate tables?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Apr 2021 15:37:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-use-to-crate-a-Freq-table-of-One-variable-with-multiple/m-p/732528#M28490</guid>
      <dc:creator>hjjijkkl</dc:creator>
      <dc:date>2021-04-09T15:37:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to use to crate a Freq table of One variable with multiple variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-use-to-crate-a-Freq-table-of-One-variable-with-multiple/m-p/732532#M28491</link>
      <description>I offered three suggestions, none of the others work?</description>
      <pubDate>Fri, 09 Apr 2021 15:53:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-use-to-crate-a-Freq-table-of-One-variable-with-multiple/m-p/732532#M28491</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-04-09T15:53:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to use to crate a Freq table of One variable with multiple variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-use-to-crate-a-Freq-table-of-One-variable-with-multiple/m-p/732537#M28492</link>
      <description>&lt;P&gt;the Macro I am not able to solve and the first suggestion doesnt give me freq, percentage and total. the third suggestion works but, it put the result in sperate tables. I wanted to result to be displayed in one table&lt;/P&gt;</description>
      <pubDate>Fri, 09 Apr 2021 16:07:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-use-to-crate-a-Freq-table-of-One-variable-with-multiple/m-p/732537#M28492</guid>
      <dc:creator>hjjijkkl</dc:creator>
      <dc:date>2021-04-09T16:07:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to use to crate a Freq table of One variable with multiple variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-use-to-crate-a-Freq-table-of-One-variable-with-multiple/m-p/732539#M28493</link>
      <description>The second suggestion (freq + data step) puts it in a single table called want. Did you examine that table? It wasn't printed by default.&lt;BR /&gt;&lt;BR /&gt;The first suggestion can be modified to include percentages and totals. Add totals with the ALL keyword and I referred you to where to look up the percentages. &lt;BR /&gt;All is shown below. If you try the percentages portion and can't figure it out, post the code you've tried and we'll be happy to help you. &lt;BR /&gt;&lt;BR /&gt;proc tabulate data=want;&lt;BR /&gt;class arm ethnicity gender sex;&lt;BR /&gt;table (ethnicity all) (gender all) (sex all), (arm all)*N;&lt;BR /&gt;run;&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Fri, 09 Apr 2021 16:18:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-use-to-crate-a-Freq-table-of-One-variable-with-multiple/m-p/732539#M28493</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-04-09T16:18:47Z</dc:date>
    </item>
    <item>
      <title>Re: How to use to crate a Freq table of One variable with multiple variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-use-to-crate-a-Freq-table-of-One-variable-with-multiple/m-p/732542#M28494</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/222563"&gt;@hjjijkkl&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;the Macro I am not able to solve and the first suggestion doesnt give me freq, percentage and total. the third suggestion works but, it put the result in sperate tables. I wanted to result to be displayed in one table&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Proc freq when you use var1*var2 produces 4 different percentages: percent of row, percent of column, percent of table and the marginal row/column total percentages. Which do you want?&lt;/P&gt;
&lt;P&gt;Really you should provide some example data, a small set works as long as it demonstrates all the needs you have, and what that result should look look like. &lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Proc Tabulate can calculate 5 different percentages for Class variables (plus can use the count of a second variable as denominator). So we need to know which percentage you want. Also similar percentages involving Var plus percentages of SUMS.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please do not make us drag your requirements out one-by-one as you say "but it doesn't do xxxx" when you have told us that you have a requirement for "xxx".&lt;/P&gt;</description>
      <pubDate>Fri, 09 Apr 2021 16:22:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-use-to-crate-a-Freq-table-of-One-variable-with-multiple/m-p/732542#M28494</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-04-09T16:22:13Z</dc:date>
    </item>
    <item>
      <title>Re: How to use to crate a Freq table of One variable with multiple variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-use-to-crate-a-Freq-table-of-One-variable-with-multiple/m-p/732561#M28495</link>
      <description>&lt;P&gt;This is an just an example and The numbers in the table might make nonsense. But, this how I would want to out put to look like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TD width="126px" height="29px"&gt;
&lt;P&gt;&lt;STRONG&gt;variable&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="256px" height="29px"&gt;
&lt;P&gt;&lt;STRONG&gt;Category &lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="120.667px" height="29px"&gt;
&lt;P&gt;&lt;STRONG&gt;Arm_1&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="113.333px" height="29px"&gt;
&lt;P&gt;&lt;STRONG&gt;Arm_2&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="110.667px" height="29px"&gt;
&lt;P&gt;&lt;STRONG&gt;Total&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="126px" height="29px"&gt;
&lt;P&gt;sex&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="256px" height="29px"&gt;
&lt;P&gt;Female&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="120.667px" height="29px"&gt;
&lt;P&gt;1/45 (2)&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="113.333px" height="29px"&gt;
&lt;P&gt;3/86 (3.5)&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="110.667px" height="29px"&gt;
&lt;P&gt;4/131 (3)&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="126px" height="29px"&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="256px" height="29px"&gt;
&lt;P&gt;Male&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="120.667px" height="29px"&gt;
&lt;P&gt;23/23 (100.0)&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="113.333px" height="29px"&gt;
&lt;P&gt;54/58 (93.1)&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="110.667px" height="29px"&gt;
&lt;P&gt;80/84 (95.2)&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD colspan="5" width="726.667px" height="29px"&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="126px" height="29px"&gt;
&lt;P&gt;Race&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="256px" height="29px"&gt;
&lt;P&gt;Black&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="120.667px" height="29px"&gt;
&lt;P&gt;1/45 (2)&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="113.333px" height="29px"&gt;
&lt;P&gt;3/86 (3.5)&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="110.667px" height="29px"&gt;
&lt;P&gt;4/131 (3)&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="126px" height="29px"&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="256px" height="29px"&gt;
&lt;P&gt;white&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="120.667px" height="29px"&gt;
&lt;P&gt;6/45 (100.0)&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="113.333px" height="29px"&gt;
&lt;P&gt;7/86 (93.1)&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="110.667px" height="29px"&gt;
&lt;P&gt;13/131 (9.9)&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="126px" height="29px"&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="256px" height="29px"&gt;
&lt;P&gt;Hispanic&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="120.667px" height="29px"&gt;
&lt;P&gt;6/45 (2)&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="113.333px" height="29px"&gt;
&lt;P&gt;9/86 (3.5)&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="110.667px" height="29px"&gt;
&lt;P&gt;15/131 (11.5)&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;</description>
      <pubDate>Fri, 09 Apr 2021 17:16:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-use-to-crate-a-Freq-table-of-One-variable-with-multiple/m-p/732561#M28495</guid>
      <dc:creator>hjjijkkl</dc:creator>
      <dc:date>2021-04-09T17:16:08Z</dc:date>
    </item>
    <item>
      <title>Re: How to use to crate a Freq table of One variable with multiple variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-use-to-crate-a-Freq-table-of-One-variable-with-multiple/m-p/732644#M28506</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/222563"&gt;@hjjijkkl&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;This is an just an example and The numbers in the table might make nonsense. But, this how I would want to out put to look like&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE&gt;
&lt;THEAD&gt;
&lt;TR&gt;
&lt;TD width="126px" height="29px"&gt;
&lt;P&gt;&lt;STRONG&gt;variable&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="256px" height="29px"&gt;
&lt;P&gt;&lt;STRONG&gt;Category &lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="120.667px" height="29px"&gt;
&lt;P&gt;&lt;STRONG&gt;Arm_1&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="113.333px" height="29px"&gt;
&lt;P&gt;&lt;STRONG&gt;Arm_2&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="110.667px" height="29px"&gt;
&lt;P&gt;&lt;STRONG&gt;Total&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/THEAD&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="126px" height="29px"&gt;
&lt;P&gt;sex&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="256px" height="29px"&gt;
&lt;P&gt;Female&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="120.667px" height="29px"&gt;
&lt;P&gt;1/45 (2)&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="113.333px" height="29px"&gt;
&lt;P&gt;3/86 (3.5)&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="110.667px" height="29px"&gt;
&lt;P&gt;4/131 (3)&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="126px" height="29px"&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="256px" height="29px"&gt;
&lt;P&gt;Male&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="120.667px" height="29px"&gt;
&lt;P&gt;23/23 (100.0)&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="113.333px" height="29px"&gt;
&lt;P&gt;54/58 (93.1)&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="110.667px" height="29px"&gt;
&lt;P&gt;80/84 (95.2)&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD colspan="5" width="726.667px" height="29px"&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="126px" height="29px"&gt;
&lt;P&gt;Race&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="256px" height="29px"&gt;
&lt;P&gt;Black&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="120.667px" height="29px"&gt;
&lt;P&gt;1/45 (2)&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="113.333px" height="29px"&gt;
&lt;P&gt;3/86 (3.5)&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="110.667px" height="29px"&gt;
&lt;P&gt;4/131 (3)&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="126px" height="29px"&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="256px" height="29px"&gt;
&lt;P&gt;white&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="120.667px" height="29px"&gt;
&lt;P&gt;6/45 (100.0)&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="113.333px" height="29px"&gt;
&lt;P&gt;7/86 (93.1)&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="110.667px" height="29px"&gt;
&lt;P&gt;13/131 (9.9)&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="126px" height="29px"&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="256px" height="29px"&gt;
&lt;P&gt;Hispanic&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="120.667px" height="29px"&gt;
&lt;P&gt;6/45 (2)&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="113.333px" height="29px"&gt;
&lt;P&gt;9/86 (3.5)&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="110.667px" height="29px"&gt;
&lt;P&gt;15/131 (11.5)&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;For Proc tabulate to do that you would as a minimum have to have a single variable ARM with values of 1 and 2.&lt;/P&gt;
&lt;P&gt;You should be able to run this code as the SASHELP.Class data set should be in your installation:&lt;/P&gt;
&lt;PRE&gt;proc tabulate data=sashelp.class;
   class sex age;
   table sex,
         (age all='Total') *(n rowpctn)
         /
   ;
run;&lt;/PRE&gt;
&lt;P&gt;Which behaves somewhat like your first table. The Class data set doesn't have another good grouping variable.&lt;/P&gt;
&lt;P&gt;Proc Tabulate will not display a variable name or label in a separate column, that would require an additional variable and a nesting .&lt;/P&gt;</description>
      <pubDate>Fri, 09 Apr 2021 20:28:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-use-to-crate-a-Freq-table-of-One-variable-with-multiple/m-p/732644#M28506</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-04-09T20:28:30Z</dc:date>
    </item>
    <item>
      <title>Re: How to use to crate a Freq table of One variable with multiple variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-use-to-crate-a-Freq-table-of-One-variable-with-multiple/m-p/733041#M28524</link>
      <description>&lt;P&gt;How can i rename the ARM_1 and ARM_2 to blood pressure and placebo respectively&amp;nbsp; and the same with sex 1 to male and sex 2 to female in proc tabulate?&lt;/P&gt;</description>
      <pubDate>Mon, 12 Apr 2021 16:54:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-use-to-crate-a-Freq-table-of-One-variable-with-multiple/m-p/733041#M28524</guid>
      <dc:creator>hjjijkkl</dc:creator>
      <dc:date>2021-04-12T16:54:15Z</dc:date>
    </item>
    <item>
      <title>Re: How to use to crate a Freq table of One variable with multiple variable</title>
      <link>https://communities.sas.com/t5/New-SAS-User/How-to-use-to-crate-a-Freq-table-of-One-variable-with-multiple/m-p/733054#M28527</link>
      <description>I would recommend using formats. There's a good paper titled 'Not Just Another Pretty Face' that illustrates how to use formats. if you're not familiar with them.</description>
      <pubDate>Mon, 12 Apr 2021 17:53:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/How-to-use-to-crate-a-Freq-table-of-One-variable-with-multiple/m-p/733054#M28527</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2021-04-12T17:53:29Z</dc:date>
    </item>
  </channel>
</rss>

