<?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: Controlling Proc Tabulate output in SAS Procedures</title>
    <link>https://communities.sas.com/t5/SAS-Procedures/Controlling-Proc-Tabulate-output/m-p/149856#M39518</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P&gt;Cynthia@sas wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; Since you have posted code, but NOT data, it is hard to visualize the output from your TABULATE step. The issues, that I see are two-fold: 1) not understanding that TABULATE needs to have something in the COLUMN dimension (you can have a table with only a COLUMN dimension, but you can't have a table with only a ROW dimension; and 2) all of your variables are CLASS variables, so you can only get N or PCTN or ALL in the COLUMN dimension. Clearly, your complaint is that you don't want the ALL or the N, but it's not clear to me what your CLASS variables represent. For example, I have made some FAKE data using SASHELP.PRDSALE, where I assigned P_V the value of PRODUCT. That way, I can run your same code, using variables that I had to guess about. As you can see in the screen shot, the left hand side of the table (for VARNAME, XCAT, NCP1, NCP2 and P_V) is in the "ROW" dimension (under the box area), and ALL is in the "COLUMN" dimension to the right of the box area.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; The structure of your data will make a difference -- are all your variables character variables? have you pre-calculated any summary statistics? are you trying to produce something like the demographic report shown on page 9 of this paper (&lt;A class="jive-link-external-small" href="http://www2.sas.com/proceedings/forum2008/173-2008.pdf"&gt;http://www2.sas.com/proceedings/forum2008/173-2008.pdf&lt;/A&gt;), which shows&amp;nbsp; the multiple variable names/values going down the "row area" with different statistic values in the columns? (The demographic report in the paper was created with PROC REPORT.)&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Without any data or any idea of why you don't want the ALL column, it is hard to make a constructive suggestion. TABULATE tables can have 1, 2 or 3 dimensions, but you do not get to pick what dimension shows for a 1-dimensional table -- it's always the COLUMN dimension. A 1-dim table only has COLUMNS; a 2-dim table has ROWS and COLUMNS; a 3-dim table has PAGES, ROWS and COLUMNS. So by the rules of TABULATE, you can't get a TABLE that is only ROWS. The first TABULATE step uses some FAKE data to show what your table looks like so it's easier for folks to visualize (see screen shot); the second TABULATE step illustrates 1, 2 and 3 dimensional tables using TABULATE table operators, like comma and parentheses and asterisk.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Given the code and the fake data, I don't understand what you want to produce. If your data are pre-summarized, then why not use PROC PRINT or PROC REPORT? The job of TABULATE is to group and summarize your table and to present it in tabular form. TABULATE isn't always a good choice for pre-summarized data. But, without knowing ANYTHING about your data, it's all just a guess what you want and what the values are in your data.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;** make some fake data;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;data cat_table;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; set sashelp.prdsale;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; varname = catx('~','varname',substr(country,1,1));&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; xcat = catx(' ','xcat',substr(division,1,1));&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; ncp1 = region;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; ncp2 = prodtype;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; p_v = product;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods listing close;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods html file='c:\temp\tabulate_question.html';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;title;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc tabulate data=cat_table missing order=data;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;class varname xcat ncp1 ncp2 p_v;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;table varname*(xcat *ncp1 *ncp2 *p_v ), all;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;label varname='Variable Name'&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xcat="Xcat"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ncp1='Level1'&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ncp2='Level2';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc tabulate data=sashelp.prdsale;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; class country region product;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; var actual;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; table country ; /* 1-dim all columns */&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; table region, country / box='2-dim';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; table product*region,country / box='2-dim nested row';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; table product, region, country*actual*( probt median min max) / box='3-dim with numeric var';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods html close;&lt;/STRONG&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;Thanks Cynthia for this detailed answer, I am exactly trying to accomplish the same thing as in the paper. I have my summary statistics and p values pre calculated in a dataset and I want to use proc tabulate instead of report to display them.&lt;/P&gt;&lt;P&gt;xcat- variable names&lt;/P&gt;&lt;P&gt;ncp1- ncp2 - Variable counts concatenated with %&lt;/P&gt;&lt;P&gt;p_v - pvalues&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want something very similar to figure-8 from that paper but using tabulate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks once again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 25 Jan 2014 17:04:14 GMT</pubDate>
    <dc:creator>lovedeep</dc:creator>
    <dc:date>2014-01-25T17:04:14Z</dc:date>
    <item>
      <title>Controlling Proc Tabulate output</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Controlling-Proc-Tabulate-output/m-p/149847#M39509</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to remove 'all' column from output but still want to use the keyword in order to display my table vertically, is there any way i can remove the ALL column from inside Proc tabulate or by using ODS?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is my code - &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc tabulate data=cat_table missing order=data;&lt;/P&gt;&lt;P&gt;class varname xcat ncp1 ncp2 p_v;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;table varname*(xcat *ncp1 *ncp2 *p_v ), all;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;label varname='Variable Name'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xcat=""&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ncp1='Level1'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ncp2='Level2';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jan 2014 23:26:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Controlling-Proc-Tabulate-output/m-p/149847#M39509</guid>
      <dc:creator>lovedeep</dc:creator>
      <dc:date>2014-01-22T23:26:49Z</dc:date>
    </item>
    <item>
      <title>Re: Controlling Proc Tabulate output</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Controlling-Proc-Tabulate-output/m-p/149848#M39510</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Since you're only looking for counts trying putting the N where the all is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc tabulate data=cat_table missing order=data;&lt;/P&gt;&lt;P&gt;class varname xcat ncp1 ncp2 p_v;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 10pt;"&gt;table varname*(xcat *ncp1 *ncp2 *p_v ), N="Awesome Total";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;label varname='Variable Name'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xcat=""&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ncp1='Level1'&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ncp2='Level2';&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Jan 2014 23:38:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Controlling-Proc-Tabulate-output/m-p/149848#M39510</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-01-22T23:38:25Z</dc:date>
    </item>
    <item>
      <title>Re: Controlling Proc Tabulate output</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Controlling-Proc-Tabulate-output/m-p/149849#M39511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Reeza, but i dont want anything in last column, I am just using these to get a vertical display, in output i would like to suppress these.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jan 2014 01:09:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Controlling-Proc-Tabulate-output/m-p/149849#M39511</guid>
      <dc:creator>lovedeep</dc:creator>
      <dc:date>2014-01-23T01:09:28Z</dc:date>
    </item>
    <item>
      <title>Re: Controlling Proc Tabulate output</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Controlling-Proc-Tabulate-output/m-p/149850#M39512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ok. Why not use proc freq with list option or proc sql with distinct option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; select distinct &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;varname label='label1', xcat, ncp1, ncp2, p_v&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;from cat_table;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;quit;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc freq data=want noprint;&lt;/P&gt;&lt;P&gt;table &lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;varname*xcat *ncp1 *ncp2 *p_v/list out=summary1 (drop=count percent);&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;run;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jan 2014 01:23:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Controlling-Proc-Tabulate-output/m-p/149850#M39512</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-01-23T01:23:15Z</dc:date>
    </item>
    <item>
      <title>Re: Controlling Proc Tabulate output</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Controlling-Proc-Tabulate-output/m-p/149851#M39513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;if you want NO STATS, don't use tabulate, just SORT&lt;/P&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P&gt;lovedeep wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;I want to remove 'all' column from output but still want to use the keyword in order to display my table vertically, is there any way i can remove the ALL column from inside Proc tabulate or by using ODS?&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;here is my code -&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;proc tabulate data=cat_table missing order=data;&lt;/P&gt;
&lt;P&gt;class varname xcat ncp1 ncp2 p_v;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;table varname*(xcat *ncp1 *ncp2 *p_v ), all;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;label varname='Variable Name'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xcat=""&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; ncp1='Level1'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; ncp2='Level2';&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;PROC SORT &lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; background-color: #ffffff;"&gt;data=cat_table&lt;/SPAN&gt;( keep= &lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; background-color: #ffffff;"&gt;varname xcat ncp1 ncp2 p_v&lt;/SPAN&gt; )&lt;/P&gt;&lt;P&gt;nodupkey out= output_dataset( RENAME= (NCP1 = Level1 ncp2=Level2) ) ;&lt;/P&gt;&lt;P&gt;by &lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; background-color: #ffffff;"&gt;varname xcat ncp1 ncp2 p_v&lt;/SPAN&gt; ;&lt;/P&gt;&lt;P&gt;run ;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc print ;&lt;/P&gt;&lt;P&gt;run ;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jan 2014 11:50:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Controlling-Proc-Tabulate-output/m-p/149851#M39513</guid>
      <dc:creator>Peter_C</dc:creator>
      <dc:date>2014-01-23T11:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: Controlling Proc Tabulate output</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Controlling-Proc-Tabulate-output/m-p/149852#M39514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P&gt;Peter.C wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;if you want NO STATS, don't use tabulate, just SORT&lt;/P&gt;
&lt;BLOCKQUOTE class="jive-quote"&gt;
&lt;P&gt;lovedeep wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;I want to remove 'all' column from output but still want to use the keyword in order to display my table vertically, is there any way i can remove the ALL column from inside Proc tabulate or by using ODS?&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;here is my code -&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;proc tabulate data=cat_table missing order=data;&lt;/P&gt;
&lt;P&gt;class varname xcat ncp1 ncp2 p_v;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 10pt; line-height: 1.5em;"&gt;table varname*(xcat *ncp1 *ncp2 *p_v ), all;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;label varname='Variable Name'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xcat=""&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; ncp1='Level1'&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; ncp2='Level2';&lt;/P&gt;
&lt;P&gt;run;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;
&lt;P&gt;PROC SORT &lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; background-color: #ffffff;"&gt;data=cat_table&lt;/SPAN&gt;( keep= &lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; background-color: #ffffff;"&gt;varname xcat ncp1 ncp2 p_v&lt;/SPAN&gt; )&lt;/P&gt;
&lt;P&gt;nodupkey out= output_dataset( RENAME= (NCP1 = Level1 ncp2=Level2) ) ;&lt;/P&gt;
&lt;P&gt;by &lt;SPAN style="font-family: 'Lucida Grande', Arial, Helvetica, sans-serif; background-color: #ffffff;"&gt;varname xcat ncp1 ncp2 p_v&lt;/SPAN&gt; ;&lt;/P&gt;
&lt;P&gt;run ;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;proc print ;&lt;/P&gt;
&lt;P&gt;run ;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;I would have, But I am working on a project and i need to use tabulate, otherwise i could have easily done it with any other proc.&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jan 2014 15:15:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Controlling-Proc-Tabulate-output/m-p/149852#M39514</guid>
      <dc:creator>lovedeep</dc:creator>
      <dc:date>2014-01-23T15:15:59Z</dc:date>
    </item>
    <item>
      <title>Re: Controlling Proc Tabulate output</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Controlling-Proc-Tabulate-output/m-p/149853#M39515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Why do you have to use Tabulate? What does it have that other procedures don't?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jan 2014 15:52:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Controlling-Proc-Tabulate-output/m-p/149853#M39515</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-01-23T15:52:49Z</dc:date>
    </item>
    <item>
      <title>Re: Controlling Proc Tabulate output</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Controlling-Proc-Tabulate-output/m-p/149854#M39516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P&gt;Reeza wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Why do you have to use Tabulate? What does it have that other procedures don't?&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is related to a project needed to be done using using proc tabulate, otherwise i could have achieved the same using report or sql.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Jan 2014 15:59:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Controlling-Proc-Tabulate-output/m-p/149854#M39516</guid>
      <dc:creator>lovedeep</dc:creator>
      <dc:date>2014-01-23T15:59:20Z</dc:date>
    </item>
    <item>
      <title>Re: Controlling Proc Tabulate output</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Controlling-Proc-Tabulate-output/m-p/149855#M39517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Since you have posted code, but NOT data, it is hard to visualize the output from your TABULATE step. The issues, that I see are two-fold: 1) not understanding that TABULATE needs to have something in the COLUMN dimension (you can have a table with only a COLUMN dimension, but you can't have a table with only a ROW dimension; and 2) all of your variables are CLASS variables, so you can only get N or PCTN or ALL in the COLUMN dimension. Clearly, your complaint is that you don't want the ALL or the N, but it's not clear to me what your CLASS variables represent. For example, I have made some FAKE data using SASHELP.PRDSALE, where I assigned P_V the value of PRODUCT. That way, I can run your same code, using variables that I had to guess about. As you can see in the screen shot, the left hand side of the table (for VARNAME, XCAT, NCP1, NCP2 and P_V) is in the "ROW" dimension (under the box area), and ALL is in the "COLUMN" dimension to the right of the box area.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; The structure of your data will make a difference -- are all your variables character variables? have you pre-calculated any summary statistics? are you trying to produce something like the demographic report shown on page 9 of this paper (&lt;A href="http://www2.sas.com/proceedings/forum2008/173-2008.pdf"&gt;http://www2.sas.com/proceedings/forum2008/173-2008.pdf&lt;/A&gt;), which shows&amp;nbsp; the multiple variable names/values going down the "row area" with different statistic values in the columns? (The demographic report in the paper was created with PROC REPORT.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Without any data or any idea of why you don't want the ALL column, it is hard to make a constructive suggestion. TABULATE tables can have 1, 2 or 3 dimensions, but you do not get to pick what dimension shows for a 1-dimensional table -- it's always the COLUMN dimension. A 1-dim table only has COLUMNS; a 2-dim table has ROWS and COLUMNS; a 3-dim table has PAGES, ROWS and COLUMNS. So by the rules of TABULATE, you can't get a TABLE that is only ROWS. The first TABULATE step uses some FAKE data to show what your table looks like so it's easier for folks to visualize (see screen shot); the second TABULATE step illustrates 1, 2 and 3 dimensional tables using TABULATE table operators, like comma and parentheses and asterisk.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Given the code and the fake data, I don't understand what you want to produce. If your data are pre-summarized, then why not use PROC PRINT or PROC REPORT? The job of TABULATE is to group and summarize your table and to present it in tabular form. TABULATE isn't always a good choice for pre-summarized data. But, without knowing ANYTHING about your data, it's all just a guess what you want and what the values are in your data.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cynthia&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;** make some fake data;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;data cat_table;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; set sashelp.prdsale;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; varname = catx('~','varname',substr(country,1,1));&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; xcat = catx(' ','xcat',substr(division,1,1));&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; ncp1 = region;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; ncp2 = prodtype;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; p_v = product;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods listing close;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods html file='c:\temp\tabulate_question.html';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;title;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc tabulate data=cat_table missing order=data;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;class varname xcat ncp1 ncp2 p_v;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;table varname*(xcat *ncp1 *ncp2 *p_v ), all;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;label varname='Variable Name'&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xcat="Xcat"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ncp1='Level1'&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ncp2='Level2';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc tabulate data=sashelp.prdsale;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; class country region product;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; var actual;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; table country ; /* 1-dim all columns */&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; table region, country / box='2-dim';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; table product*region,country / box='2-dim nested row';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; table product, region, country*actual*( probt median min max) / box='3-dim with numeric var';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods html close;&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;&lt;IMG src="https://communities.sas.com/t5/image/serverpage/image-id/11113iA7BED73DC8A9EFE3/image-size/large?v=1.0&amp;amp;px=600" border="0" alt="all_vars_class_vars.png" title="all_vars_class_vars.png" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Jan 2014 15:15:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Controlling-Proc-Tabulate-output/m-p/149855#M39517</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2014-01-25T15:15:29Z</dc:date>
    </item>
    <item>
      <title>Re: Controlling Proc Tabulate output</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Controlling-Proc-Tabulate-output/m-p/149856#M39518</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P&gt;Cynthia@sas wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp; Since you have posted code, but NOT data, it is hard to visualize the output from your TABULATE step. The issues, that I see are two-fold: 1) not understanding that TABULATE needs to have something in the COLUMN dimension (you can have a table with only a COLUMN dimension, but you can't have a table with only a ROW dimension; and 2) all of your variables are CLASS variables, so you can only get N or PCTN or ALL in the COLUMN dimension. Clearly, your complaint is that you don't want the ALL or the N, but it's not clear to me what your CLASS variables represent. For example, I have made some FAKE data using SASHELP.PRDSALE, where I assigned P_V the value of PRODUCT. That way, I can run your same code, using variables that I had to guess about. As you can see in the screen shot, the left hand side of the table (for VARNAME, XCAT, NCP1, NCP2 and P_V) is in the "ROW" dimension (under the box area), and ALL is in the "COLUMN" dimension to the right of the box area.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; The structure of your data will make a difference -- are all your variables character variables? have you pre-calculated any summary statistics? are you trying to produce something like the demographic report shown on page 9 of this paper (&lt;A class="jive-link-external-small" href="http://www2.sas.com/proceedings/forum2008/173-2008.pdf"&gt;http://www2.sas.com/proceedings/forum2008/173-2008.pdf&lt;/A&gt;), which shows&amp;nbsp; the multiple variable names/values going down the "row area" with different statistic values in the columns? (The demographic report in the paper was created with PROC REPORT.)&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Without any data or any idea of why you don't want the ALL column, it is hard to make a constructive suggestion. TABULATE tables can have 1, 2 or 3 dimensions, but you do not get to pick what dimension shows for a 1-dimensional table -- it's always the COLUMN dimension. A 1-dim table only has COLUMNS; a 2-dim table has ROWS and COLUMNS; a 3-dim table has PAGES, ROWS and COLUMNS. So by the rules of TABULATE, you can't get a TABLE that is only ROWS. The first TABULATE step uses some FAKE data to show what your table looks like so it's easier for folks to visualize (see screen shot); the second TABULATE step illustrates 1, 2 and 3 dimensional tables using TABULATE table operators, like comma and parentheses and asterisk.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Given the code and the fake data, I don't understand what you want to produce. If your data are pre-summarized, then why not use PROC PRINT or PROC REPORT? The job of TABULATE is to group and summarize your table and to present it in tabular form. TABULATE isn't always a good choice for pre-summarized data. But, without knowing ANYTHING about your data, it's all just a guess what you want and what the values are in your data.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;** make some fake data;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;data cat_table;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; set sashelp.prdsale;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; varname = catx('~','varname',substr(country,1,1));&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; xcat = catx(' ','xcat',substr(division,1,1));&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; ncp1 = region;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; ncp2 = prodtype;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; p_v = product;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods listing close;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods html file='c:\temp\tabulate_question.html';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;title;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc tabulate data=cat_table missing order=data;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;class varname xcat ncp1 ncp2 p_v;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;table varname*(xcat *ncp1 *ncp2 *p_v ), all;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;label varname='Variable Name'&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; xcat="Xcat"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ncp1='Level1'&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ncp2='Level2';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;proc tabulate data=sashelp.prdsale;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; class country region product;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; var actual;&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; table country ; /* 1-dim all columns */&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; table region, country / box='2-dim';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; table product*region,country / box='2-dim nested row';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;&amp;nbsp; table product, region, country*actual*( probt median min max) / box='3-dim with numeric var';&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;run;&lt;/STRONG&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;BR /&gt;&lt;STRONG style="font-family: courier new,courier;"&gt;ods html close;&lt;/STRONG&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;Thanks Cynthia for this detailed answer, I am exactly trying to accomplish the same thing as in the paper. I have my summary statistics and p values pre calculated in a dataset and I want to use proc tabulate instead of report to display them.&lt;/P&gt;&lt;P&gt;xcat- variable names&lt;/P&gt;&lt;P&gt;ncp1- ncp2 - Variable counts concatenated with %&lt;/P&gt;&lt;P&gt;p_v - pvalues&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want something very similar to figure-8 from that paper but using tabulate.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks once again&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Jan 2014 17:04:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Controlling-Proc-Tabulate-output/m-p/149856#M39518</guid>
      <dc:creator>lovedeep</dc:creator>
      <dc:date>2014-01-25T17:04:14Z</dc:date>
    </item>
    <item>
      <title>Re: Controlling Proc Tabulate output</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Controlling-Proc-Tabulate-output/m-p/149857#M39519</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi:&lt;/P&gt;&lt;P&gt;&amp;nbsp; Good luck with that. It will be *very* hard, as long as P_V is a CLASS variable with TABULATE. In my paper, Example 1 was done with PROC REPORT, Example 8 was done with DATA _NULL_ and a custom TABLE template. Example 1 is easier than Example 8 because all you need to do for #1 is manipulate the data in a data step program and then use PROC REPORT. With #8, you need to learn PROC TEMPLATE to generate a custom TABLE template. Since you need to pre-summarize the data to get the p-value, TABULATE will have a hard time doing what you want. As I explained, you must have a COLUMN dimension with PROC TABULATE, so there's no way to do what you originally asked (get rid of the ALL column).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; Most of my students use either PROC REPORT or DATA step to generate that type of demographic report. TABULATE is just not well suited. You might be able to pull it off if your P_V variable was numeric and used in a VAR statement, instead of a CLASS statement because that way, you could at least put PV into the COLUMN dimension...but really, without seeing the structure of the data, it's very hard to comment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cynthia&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 25 Jan 2014 19:08:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Controlling-Proc-Tabulate-output/m-p/149857#M39519</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2014-01-25T19:08:05Z</dc:date>
    </item>
    <item>
      <title>Re: Controlling Proc Tabulate output</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Controlling-Proc-Tabulate-output/m-p/149858#M39520</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE __jive_macro_name="quote" class="jive_text_macro jive_macro_quote"&gt;
&lt;P&gt;Cynthia@sas wrote:&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Good luck with that. It will be *very* hard, as long as P_V is a CLASS variable with TABULATE. In my paper, Example 1 was done with PROC REPORT, Example 8 was done with DATA _NULL_ and a custom TABLE template. Example 1 is easier than Example 8 because all you need to do for #1 is manipulate the data in a data step program and then use PROC REPORT. With #8, you need to learn PROC TEMPLATE to generate a custom TABLE template. Since you need to pre-summarize the data to get the p-value, TABULATE will have a hard time doing what you want. As I explained, you must have a COLUMN dimension with PROC TABULATE, so there's no way to do what you originally asked (get rid of the ALL column).&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Most of my students use either PROC REPORT or DATA step to generate that type of demographic report. TABULATE is just not well suited. You might be able to pull it off if your P_V variable was numeric and used in a VAR statement, instead of a CLASS statement because that way, you could at least put PV into the COLUMN dimension...but really, without seeing the structure of the data, it's very hard to comment.&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;cynthia&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;Thanks Cynthia,&lt;/P&gt;&lt;P&gt;I know its going to be a hard one, Here is the screenshot of my dataset. Can you point me to a good resource to create ta template for my desired output.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="dataset.jpg" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/4791_dataset.jpg" width="450" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2014 16:30:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Controlling-Proc-Tabulate-output/m-p/149858#M39520</guid>
      <dc:creator>lovedeep</dc:creator>
      <dc:date>2014-01-27T16:30:06Z</dc:date>
    </item>
    <item>
      <title>Re: Controlling Proc Tabulate output</title>
      <link>https://communities.sas.com/t5/SAS-Procedures/Controlling-Proc-Tabulate-output/m-p/149859#M39521</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I still don't understand why you NEED to use proc tabulate.&lt;/P&gt;&lt;P&gt;I constantly generate tables like these for Journal publications, but use Report and Print and they work great. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 27 Jan 2014 23:36:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Procedures/Controlling-Proc-Tabulate-output/m-p/149859#M39521</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2014-01-27T23:36:16Z</dc:date>
    </item>
  </channel>
</rss>

