<?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 Proc Tabulate formatting, creating headings and a sum column in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Proc-Tabulate-formatting-creating-headings-and-a-sum-column/m-p/862615#M340739</link>
    <description>&lt;P&gt;Hello&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In need of some help regarding proc tabulate and how to format my output a certain way.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My current code:&lt;/P&gt;&lt;P&gt;ods _all_ close;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ods excel file="E:\Users\Daniel Paredes\ALLPCLEVELS.xlsx";&lt;/P&gt;&lt;P&gt;proc tabulate data=final style=minimal format=comma6.;&lt;BR /&gt;class User District / order=data s=[font_weight=bold];&lt;BR /&gt;var Email--Progressing;&lt;/P&gt;&lt;P&gt;table User*District all ='Average'*f=6.2,&lt;BR /&gt;Email--Progressing*mean=' '/s=[font_weight=light font_size=6] nocellmerge;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods excel close;&lt;BR /&gt;ods listing;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;My current codes output image below&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DanielP91_0-1678168161676.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/81132iD2311E602B777F5C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DanielP91_0-1678168161676.png" alt="DanielP91_0-1678168161676.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I am trying to achieve and am having issues coding this is below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DanielP91_2-1678168201105.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/81134i96CC503F7F602D3A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DanielP91_2-1678168201105.png" alt="DanielP91_2-1678168201105.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I would like my new tabulate report to have a heading called 'PC Actions Taken' above the columns Email to Other with a sum of those columns called 'Total Action Taken'. And a heading called 'PC Level of Contact' above columns High to Progressing with a sum of those columns called 'Total Levels of Contact'.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your help and suggestions would be greatly appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've also attached the spreadsheet with the example sheets.&amp;nbsp;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 07 Mar 2023 05:54:27 GMT</pubDate>
    <dc:creator>DanielP91</dc:creator>
    <dc:date>2023-03-07T05:54:27Z</dc:date>
    <item>
      <title>Proc Tabulate formatting, creating headings and a sum column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Tabulate-formatting-creating-headings-and-a-sum-column/m-p/862615#M340739</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In need of some help regarding proc tabulate and how to format my output a certain way.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;My current code:&lt;/P&gt;&lt;P&gt;ods _all_ close;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;ods excel file="E:\Users\Daniel Paredes\ALLPCLEVELS.xlsx";&lt;/P&gt;&lt;P&gt;proc tabulate data=final style=minimal format=comma6.;&lt;BR /&gt;class User District / order=data s=[font_weight=bold];&lt;BR /&gt;var Email--Progressing;&lt;/P&gt;&lt;P&gt;table User*District all ='Average'*f=6.2,&lt;BR /&gt;Email--Progressing*mean=' '/s=[font_weight=light font_size=6] nocellmerge;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ods excel close;&lt;BR /&gt;ods listing;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;My current codes output image below&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DanielP91_0-1678168161676.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/81132iD2311E602B777F5C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DanielP91_0-1678168161676.png" alt="DanielP91_0-1678168161676.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What I am trying to achieve and am having issues coding this is below:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="DanielP91_2-1678168201105.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/81134i96CC503F7F602D3A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="DanielP91_2-1678168201105.png" alt="DanielP91_2-1678168201105.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;I would like my new tabulate report to have a heading called 'PC Actions Taken' above the columns Email to Other with a sum of those columns called 'Total Action Taken'. And a heading called 'PC Level of Contact' above columns High to Progressing with a sum of those columns called 'Total Levels of Contact'.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Your help and suggestions would be greatly appreciated.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've also attached the spreadsheet with the example sheets.&amp;nbsp;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 05:54:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Tabulate-formatting-creating-headings-and-a-sum-column/m-p/862615#M340739</guid>
      <dc:creator>DanielP91</dc:creator>
      <dc:date>2023-03-07T05:54:27Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Tabulate formatting, creating headings and a sum column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Tabulate-formatting-creating-headings-and-a-sum-column/m-p/862690#M340766</link>
      <description>&lt;P&gt;Many users here don't want to download Excel files because of virus potential, others have such things blocked by security software or organization policy. Also if you give us Excel we have to create a SAS data set and due to the non-existent constraints on Excel data cells the result we end up with may not have variables of the same type (numeric or character) and even values.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It helps to post code into a text box opened with the &amp;lt;/&amp;gt; icon above the message window to preserve formatting and to set the code apart from question text.&lt;/P&gt;
&lt;P&gt;Place the statistic request before the variable names and override the statistic label&lt;/P&gt;
&lt;PRE&gt;proc tabulate data=final style=minimal format=comma6.;
    class User District / order=data s=[font_weight=bold];
    var Email--Progressing;

    table User*District all ='Average'*f=6.2,
    mean='Total Action Taken'/s=[font_weight=light font_size=6]* ( Email--Other) 
    mean='PC Level of Contact'/s=[font_weight=light font_size=6]* ( High--Processing) 
   ;
run;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Mar 2023 15:50:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Tabulate-formatting-creating-headings-and-a-sum-column/m-p/862690#M340766</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2023-03-07T15:50:25Z</dc:date>
    </item>
    <item>
      <title>Re: Proc Tabulate formatting, creating headings and a sum column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Proc-Tabulate-formatting-creating-headings-and-a-sum-column/m-p/862856#M340828</link>
      <description>&lt;P&gt;Thanks ballarddw your suggested code has worked. Appreciate that.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Also, will make a note the information you provide for future reference. A little new to this community and still finding my way around &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 08 Mar 2023 01:43:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Proc-Tabulate-formatting-creating-headings-and-a-sum-column/m-p/862856#M340828</guid>
      <dc:creator>DanielP91</dc:creator>
      <dc:date>2023-03-08T01:43:05Z</dc:date>
    </item>
  </channel>
</rss>

