<?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: Presenting results for specific row/columns using proc tabulate in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Presenting-results-for-specific-row-columns-using-proc-tabulate/m-p/731925#M228039</link>
    <description>Thank you for the reply. However, the variables in the want2 are:&lt;BR /&gt;dz_wt_sum&lt;BR /&gt;dz_wt_pctsum_10&lt;BR /&gt;dz_wt_pctsum_00&lt;BR /&gt;Sorry for the poor image with small font!&lt;BR /&gt;&lt;BR /&gt;I have used the above variables in my code and now it's working. I am getting the right statistics but the 'total' row is missing. I am clueless as to why this is happening, any ideas??&lt;BR /&gt;</description>
    <pubDate>Wed, 07 Apr 2021 14:20:07 GMT</pubDate>
    <dc:creator>Priyamvada07</dc:creator>
    <dc:date>2021-04-07T14:20:07Z</dc:date>
    <item>
      <title>Presenting results for specific row/columns using proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Presenting-results-for-specific-row-columns-using-proc-tabulate/m-p/731530#M227871</link>
      <description>&lt;P&gt;I have the following data&lt;/P&gt;
&lt;P&gt;DATA HAVE;&lt;BR /&gt;input year dz $8. area;&lt;BR /&gt;cards;&lt;BR /&gt;2000 stroke 08&lt;BR /&gt;2000 stroke 06&lt;BR /&gt;2000 stroke 06&lt;BR /&gt;2001 stroke 08&lt;BR /&gt;2001 stroke 06&lt;BR /&gt;2001 stroke 06&lt;BR /&gt;2002 stroke 08&lt;BR /&gt;2002 stroke 06&lt;BR /&gt;2002 stroke 06&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to create a table&amp;nbsp; for year*area with a row for total. I have used the following code&amp;nbsp; for it&lt;/P&gt;
&lt;P&gt;proc tabulate data=have;&lt;BR /&gt;class year area dz;&lt;BR /&gt;tables (year=' ' all='Total'), ((area=' ')*(n pctn) &lt;BR /&gt;(all='Total')*(n pctn)) /box=year;&lt;BR /&gt;Title j=center height=16pt "Table year by spa for dz";&lt;BR /&gt;OPTION LINESIZE= 256 NODATE;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Which gave me the following output&lt;/P&gt;
&lt;P&gt;&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="Priyamvada07_0-1617696543617.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/56978i0DEA5EEA29F7B72A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Priyamvada07_0-1617696543617.png" alt="Priyamvada07_0-1617696543617.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;In this output I want all the exact rows and columns &lt;STRONG&gt;except the row for year '2000'. Please note I want the same values in the total row and column.&lt;/STRONG&gt; Is there a way to do it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2021 08:14:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Presenting-results-for-specific-row-columns-using-proc-tabulate/m-p/731530#M227871</guid>
      <dc:creator>Priyamvada07</dc:creator>
      <dc:date>2021-04-06T08:14:40Z</dc:date>
    </item>
    <item>
      <title>Re: Presenting results for specific row/columns using proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Presenting-results-for-specific-row-columns-using-proc-tabulate/m-p/731541#M227873</link>
      <description>&lt;P&gt;I saved the TABULATE result to a dataset, modified it, and used REPORT to create the output:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input year dz $8. area;
cards;
2000 stroke 08
2000 stroke 06
2000 stroke 06
2001 stroke 08
2001 stroke 06
2001 stroke 06
2002 stroke 08
2002 stroke 06
2002 stroke 06
;

proc tabulate
  data=have
  out=want (where=(year ne 2000))
;
class year area dz;
tables (year=' ' all='Total'), ((area=' ')*(n pctn) 
(all='Total')*(n pctn)) /box=year;
Title j=center height=16pt "Table year by spa for dz";
OPTION LINESIZE= 256 NODATE;
run;

data want2;
set want;
if year = .
then _year = "Total";
else _year = put(year,z4.);
if area = .
then _area = "Total";
else _area = put(area,2.);
run;

proc report data=want2;
column _year _area,(n pctn_00);
define _year / "Year" group;
define n / analysis sum;
define pctn_00 / "PctN" analysis sum format=6.2;
define _area / "" across;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 06 Apr 2021 09:00:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Presenting-results-for-specific-row-columns-using-proc-tabulate/m-p/731541#M227873</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-04-06T09:00:51Z</dc:date>
    </item>
    <item>
      <title>Re: Presenting results for specific row/columns using proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Presenting-results-for-specific-row-columns-using-proc-tabulate/m-p/731542#M227874</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;by suppressing the year2000 row you will be reporting mistakenly since total pctn will still show 100%&lt;/P&gt;
&lt;P&gt;I guess you'll have to modify your data afterwards:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;ods select none;
proc tabulate data=have out=want;
class year area dz;
tables (year=' ' all='Total'), ((area=' ')*(n pctn)
(all='Total')*(n pctn)) /box=year;
Title j=center height=16pt "Table year by spa for dz";
OPTION LINESIZE= 256 NODATE;
run;
ods select all;

PROC FORMAT;
   value f_total
   9999='Total'
   ;
RUN;

data want;
   set want;
   if missing(year) then year=9999;
   if missing(area) then area=9999;
   format year area f_total.;
   PctN_00=PctN_00/100;
run;

PROC REPORT data=want;
   where year ne 2000;
   column year area,(N PctN_00);
   define year    / group  order=internal f=f_total. 'Year';
   define area    / across order=internal f=f_total. '';
   define N       / sum 'N';
   define PctN_00 / 'PctN' f=percent8.2;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Apr 2021 13:09:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Presenting-results-for-specific-row-columns-using-proc-tabulate/m-p/731542#M227874</guid>
      <dc:creator>Oligolas</dc:creator>
      <dc:date>2021-04-07T13:09:34Z</dc:date>
    </item>
    <item>
      <title>Re: Presenting results for specific row/columns using proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Presenting-results-for-specific-row-columns-using-proc-tabulate/m-p/731600#M227900</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/282708"&gt;@Priyamvada07&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;I have the following data&lt;/P&gt;
&lt;P&gt;DATA HAVE;&lt;BR /&gt;input year dz $8. area;&lt;BR /&gt;cards;&lt;BR /&gt;2000 stroke 08&lt;BR /&gt;2000 stroke 06&lt;BR /&gt;2000 stroke 06&lt;BR /&gt;2001 stroke 08&lt;BR /&gt;2001 stroke 06&lt;BR /&gt;2001 stroke 06&lt;BR /&gt;2002 stroke 08&lt;BR /&gt;2002 stroke 06&lt;BR /&gt;2002 stroke 06&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to create a table&amp;nbsp; for year*area with a row for total. I have used the following code&amp;nbsp; for it&lt;/P&gt;
&lt;P&gt;proc tabulate data=have;&lt;BR /&gt;class year area dz;&lt;BR /&gt;tables (year=' ' all='Total'), ((area=' ')*(n pctn) &lt;BR /&gt;(all='Total')*(n pctn)) /box=year;&lt;BR /&gt;Title j=center height=16pt "Table year by spa for dz";&lt;BR /&gt;OPTION LINESIZE= 256 NODATE;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Which gave me the following output&lt;/P&gt;
&lt;P&gt;&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="Priyamvada07_0-1617696543617.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/56978i0DEA5EEA29F7B72A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Priyamvada07_0-1617696543617.png" alt="Priyamvada07_0-1617696543617.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;In this output I want all the exact rows and columns &lt;STRONG&gt;except the row for year '2000'. Please note I want the same values in the total row and column.&lt;/STRONG&gt; Is there a way to do it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Please see:&lt;/P&gt;
&lt;PRE&gt;DATA HAVE;
input year dz $8. area;
cards;
2000 stroke 08
2000 stroke 06
2000 stroke 06
2001 stroke 08
2001 stroke 06
2001 stroke 06
2002 stroke 08
2002 stroke 06
2002 stroke 06
;
run;

data classdataset;
  input year dz $8. area;
datalines;
2001 stroke 08
2001 stroke 06
2002 stroke 08
2002 stroke 06
;
title;
proc tabulate data=have classdata=classdataset;
class year area dz;
tables (year=' ' all='Total'), ((area=' ')*(n pctn)
(all='Total')*(n pctn)) /box=year;

run;&lt;/PRE&gt;
&lt;P&gt;The classdata option uses a data set with the levels of the class data variables that you want to display in the table.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I removed the option and title statements as they didn't have any bearing on the actual issue.&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2021 14:07:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Presenting-results-for-specific-row-columns-using-proc-tabulate/m-p/731600#M227900</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2021-04-06T14:07:58Z</dc:date>
    </item>
    <item>
      <title>Re: Presenting results for specific row/columns using proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Presenting-results-for-specific-row-columns-using-proc-tabulate/m-p/731742#M227964</link>
      <description>&lt;P&gt;So this code is working perfectly. However, in my actual dataset I am using a WEIGHT variable and I am suspecting because of it I am not getting the desired output from the PROC REPORT step.&lt;/P&gt;
&lt;P&gt;I have created a new data with a dummy WEIGHT variable 'dz' (which is actually not weighted).&lt;BR /&gt;DATA HAVE;&lt;BR /&gt;input year dz $8. area;&lt;BR /&gt;cards;&lt;BR /&gt;2000 1 08&lt;BR /&gt;2000 1 06&lt;BR /&gt;2000 2 06&lt;BR /&gt;2001 2 08&lt;BR /&gt;2001 2 06&lt;BR /&gt;2001 3 06&lt;BR /&gt;2002 3 08&lt;BR /&gt;2002 3 06&lt;BR /&gt;2002 1 06&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;I am using similar code in my original dataset &lt;BR /&gt;proc format;&lt;BR /&gt;picture count (round)&lt;BR /&gt;0-4 = ' &amp;lt;5' (NOEDIT);&lt;BR /&gt;picture pcnt (round)&lt;BR /&gt;0 = ' - '&lt;BR /&gt;other = '009.9%';&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;proc tabulate&lt;BR /&gt;data=have&lt;BR /&gt;out=want (where=(year ne 2000))&lt;BR /&gt;;&lt;BR /&gt;class year area;&lt;BR /&gt;tables (year=' ' all='Total'), ((area=' ')*(dz="No."*sum*f=count. dz='%'*rowpctsum*f=pcnt.) &lt;BR /&gt;(all='Total')*(dz="No."*sum*f=count. dz='%'*rowpctsum*f=pcnt.)) /box=year;&lt;BR /&gt;var dz;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;This code doesn't work for this data as 'dz' is actually not weighted. However, I am sharing it to discuss the issue with my original dataset.&lt;/P&gt;
&lt;P&gt;Now lets assume the above proc step actually works then I do the below from your code&lt;/P&gt;
&lt;P&gt;data want2;&lt;BR /&gt;set want;&lt;BR /&gt;if year = .&lt;BR /&gt;then _year = "Total";&lt;BR /&gt;else _year = put(year,z4.);&lt;BR /&gt;if area = .&lt;BR /&gt;then _area = "Total";&lt;BR /&gt;else _area = put(area,2.);&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;When I print the 'want2' data I would get somethin like below&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Priyamvada07_0-1617749312499.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/57012i5704BC9533271866/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Priyamvada07_0-1617749312499.png" alt="Priyamvada07_0-1617749312499.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Based on the above columns I would lastly do the proc report step&lt;/P&gt;
&lt;P&gt;proc report data=want2;&lt;BR /&gt;column _year _area,(dz_wt_Sum dz_wt_PctSum_10);&lt;BR /&gt;define _year / "Year" group;&lt;BR /&gt;define dz_wt_Sum / analysis sum;&lt;BR /&gt;define dz_wt_PctSum_10 / "PctN" analysis sum format=6.2;&lt;BR /&gt;define _area / "" across;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;All of the steps until PROC REPORT work fine but after the PROC REPORT I get a warning that says "dz_wt_PctSum_10" and "dz_wt_Sum" are not in the report definition. And of course I don't get the desired report. Can you let me know where I am going wrong.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I know it is hard to understand the issue from my example code which actually doesn't work. But this has worked in the original dataset until the PROC REPORT step.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you!&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 06 Apr 2021 22:59:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Presenting-results-for-specific-row-columns-using-proc-tabulate/m-p/731742#M227964</guid>
      <dc:creator>Priyamvada07</dc:creator>
      <dc:date>2021-04-06T22:59:51Z</dc:date>
    </item>
    <item>
      <title>Re: Presenting results for specific row/columns using proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Presenting-results-for-specific-row-columns-using-proc-tabulate/m-p/731820#M227998</link>
      <description>&lt;P&gt;Look at the variables in want2. You have&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;dz_sum&lt;/LI&gt;
&lt;LI&gt;dz_pctsum_10_dz&lt;/LI&gt;
&lt;LI&gt;dz_pctsum_00_dz&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;So your complete code should be&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input year dz area;
cards;
2000 1 08
2000 1 06
2000 2 06
2001 2 08
2001 2 06
2001 3 06
2002 3 08
2002 3 06
2002 1 06
;

proc format;
picture count (round)
  0-4 = ' &amp;lt;5' (NOEDIT)
;
picture pcnt (round)
  0 = ' - '
  other = '009.9%'
;
run;

proc tabulate
  data=have
  out=want (where=(year ne 2000))
;
class year area;
tables (year=' ' all='Total'), ((area=' ')*(dz="No."*sum*f=count. dz='%'*rowpctsum*f=pcnt.) 
(all='Total')*(dz="No."*sum*f=count. dz='%'*rowpctsum*f=pcnt.)) /box=year;
var dz;
run;

data want2;
set want;
if year = .
then _year = "Total";
else _year = put(year,z4.);
if area = .
then _area = "Total";
else _area = put(area,2.);
run;

proc report data=want2;
column _year _area,(dz_Sum dz_PctSum_10_dz);
define _year / "Year" group;
define dz_Sum / analysis sum;
define dz_PctSum_10_dz / "PctN" analysis sum format=6.2;
define _area / "" across;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Note: use the indicated button for posting logs or other fixed-width text:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/54552i914D97BE1B0F21E5/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" alt="Bildschirmfoto 2020-04-07 um 08.32.59.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;and the "little running man" right next to it for SAS code.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Apr 2021 07:03:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Presenting-results-for-specific-row-columns-using-proc-tabulate/m-p/731820#M227998</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-04-07T07:03:10Z</dc:date>
    </item>
    <item>
      <title>Re: Presenting results for specific row/columns using proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Presenting-results-for-specific-row-columns-using-proc-tabulate/m-p/731925#M228039</link>
      <description>Thank you for the reply. However, the variables in the want2 are:&lt;BR /&gt;dz_wt_sum&lt;BR /&gt;dz_wt_pctsum_10&lt;BR /&gt;dz_wt_pctsum_00&lt;BR /&gt;Sorry for the poor image with small font!&lt;BR /&gt;&lt;BR /&gt;I have used the above variables in my code and now it's working. I am getting the right statistics but the 'total' row is missing. I am clueless as to why this is happening, any ideas??&lt;BR /&gt;</description>
      <pubDate>Wed, 07 Apr 2021 14:20:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Presenting-results-for-specific-row-columns-using-proc-tabulate/m-p/731925#M228039</guid>
      <dc:creator>Priyamvada07</dc:creator>
      <dc:date>2021-04-07T14:20:07Z</dc:date>
    </item>
    <item>
      <title>Re: Presenting results for specific row/columns using proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Presenting-results-for-specific-row-columns-using-proc-tabulate/m-p/731928#M228040</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/282708"&gt;@Priyamvada07&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Thank you for the reply. However, the variables in the want2 are:&lt;BR /&gt;dz_wt_sum&lt;BR /&gt;dz_wt_pctsum_10&lt;BR /&gt;dz_wt_pctsum_00&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;No, they're not. Proof:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input year dz area;
cards;
2000 1 08
2000 1 06
2000 2 06
2001 2 08
2001 2 06
2001 3 06
2002 3 08
2002 3 06
2002 1 06
;

proc format;
picture count (round)
  0-4 = ' &amp;lt;5' (NOEDIT)
;
picture pcnt (round)
  0 = ' - '
  other = '009.9%'
;
run;

proc tabulate
  data=have
  out=want (where=(year ne 2000))
;
class year area;
tables (year=' ' all='Total'), ((area=' ')*(dz="No."*sum*f=count. dz='%'*rowpctsum*f=pcnt.) 
(all='Total')*(dz="No."*sum*f=count. dz='%'*rowpctsum*f=pcnt.)) /box=year;
var dz;
run;

data want2;
set want;
if year = .
then _year = "Total";
else _year = put(year,z4.);
if area = .
then _area = "Total";
else _area = put(area,2.);
run;

proc contents data=want2;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;(Partial) result:&lt;/P&gt;
&lt;PRE&gt;Alphabetische Liste der Variablen und Attribute
#	Variable	Typ	Länge	Etikett
4	_PAGE_	Num	8	Seite für Beobachtung
5	_TABLE_	Num	8	Tabelle für Beobachtung
3	_TYPE_	Char	2	Beobachtungstyp
10	_area	Char	5	 
9	_year	Char	5	 
2	area	Num	8	 
8	dz_PctSum_00_dz	Num	8	 
7	dz_PctSum_10_dz	Num	8	 
6	dz_Sum	Num	8	 
1	year	Num	8	 
&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;</description>
      <pubDate>Wed, 07 Apr 2021 14:23:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Presenting-results-for-specific-row-columns-using-proc-tabulate/m-p/731928#M228040</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-04-07T14:23:20Z</dc:date>
    </item>
    <item>
      <title>Re: Presenting results for specific row/columns using proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Presenting-results-for-specific-row-columns-using-proc-tabulate/m-p/731940#M228050</link>
      <description>&lt;P&gt;I see! You were able to run the example program, I couldn't. So, basically I had adapted the variables to match the variables from my original dataset (equivalent to want2 here). Any ideas why I am not getting the 'total' row?&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My original program has following PROC FORMAT code, could this have any bearing on why I am not getting a 'total' row?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;PROC FORMAT;
value $yrfmt    '9999'='    '
                   '88'  ='Cumulative Total ';

 value $yrfmtc  '0000-9999'='yr'
                   'ZZZZ'='All';

value yrfmt	9999='Cumulative Total';&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 07 Apr 2021 14:57:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Presenting-results-for-specific-row-columns-using-proc-tabulate/m-p/731940#M228050</guid>
      <dc:creator>Priyamvada07</dc:creator>
      <dc:date>2021-04-07T14:57:10Z</dc:date>
    </item>
    <item>
      <title>Re: Presenting results for specific row/columns using proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Presenting-results-for-specific-row-columns-using-proc-tabulate/m-p/731954#M228058</link>
      <description>&lt;P&gt;To adapt the program to your original data, I need at least a short example of that data, and the exact TABULATE code you run, so I can adapt the DATA and REPORT steps to the actual dataset structures.&lt;/P&gt;</description>
      <pubDate>Wed, 07 Apr 2021 15:30:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Presenting-results-for-specific-row-columns-using-proc-tabulate/m-p/731954#M228058</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-04-07T15:30:44Z</dc:date>
    </item>
    <item>
      <title>Re: Presenting results for specific row/columns using proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Presenting-results-for-specific-row-columns-using-proc-tabulate/m-p/732172#M228150</link>
      <description>&lt;P&gt;Actually now when I ran the code I got the following for data=want2&lt;/P&gt;
&lt;LI-CODE lang="sas"&gt;data have;
input year dz area;
cards;
2000 1 08
2000 1 06
2000 2 06
2001 2 08
2001 2 06
2001 3 06
2002 3 08
2002 3 06
2002 1 06
;

proc format;
picture count (round)
  0-4 = ' &amp;lt;5' (NOEDIT)
;
picture pcnt (round)
  0 = ' - '
  other = '009.9%'
;
run;

proc tabulate
  data=have
  out=want (where=(year ne 2000))
;
class year area;
tables (year=' ' all='Total'), ((area=' ')*(dz="No."*sum*f=count. dz='%'*rowpctsum*f=pcnt.) 
(all='Total')*(dz="No."*sum*f=count. dz='%'*rowpctsum*f=pcnt.)) /box=year;
var dz;
run;

data want2;
set want;
if year = .
then _year = "Total";
else _year = put(year,z4.);
if area = .
then _area = "Total";
else _area = put(area,2.);
run;

proc contents data=want2; run;&lt;/LI-CODE&gt;
&lt;P&gt;The variables are dz_PctSum_00, dz_PctSum_10 and dz_Sum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Not sure why you got , very strange...the same code is giving different variables.&lt;/P&gt;
&lt;PRE&gt;dz_PctSum_00_dz		 
dz_PctSum_10_dz&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Priyamvada07_0-1617868266431.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/57113i0BDF7564013F51E1/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Priyamvada07_0-1617868266431.png" alt="Priyamvada07_0-1617868266431.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Although in this example the 'total' row is being generated, the 'pctn' for 'total' row is missing.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Priyamvada07_1-1617871947070.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/57114i074EB9838CEC9C1B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Priyamvada07_1-1617871947070.png" alt="Priyamvada07_1-1617871947070.png" /&gt;&lt;/span&gt;&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 08:53:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Presenting-results-for-specific-row-columns-using-proc-tabulate/m-p/732172#M228150</guid>
      <dc:creator>Priyamvada07</dc:creator>
      <dc:date>2021-04-08T08:53:19Z</dc:date>
    </item>
    <item>
      <title>Re: Presenting results for specific row/columns using proc tabulate</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Presenting-results-for-specific-row-columns-using-proc-tabulate/m-p/732180#M228153</link>
      <description>&lt;P&gt;Please run this:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;%put &amp;amp;=sysvlong4;
%put &amp;amp;=sysscp;
%put &amp;amp;=sysencoding;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;to determine your environment.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Apr 2021 10:35:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Presenting-results-for-specific-row-columns-using-proc-tabulate/m-p/732180#M228153</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-04-08T10:35:19Z</dc:date>
    </item>
  </channel>
</rss>

