<?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: proc tabulate percentage per column in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-percentage-per-column/m-p/874435#M345484</link>
    <description>&lt;P&gt;"&lt;SPAN&gt;PCTSUM ?&lt;/SPAN&gt;" - meaning "why not &lt;SPAN&gt;PCTSUM ?&lt;/SPAN&gt;" &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 08 May 2023 12:01:54 GMT</pubDate>
    <dc:creator>yabwon</dc:creator>
    <dc:date>2023-05-08T12:01:54Z</dc:date>
    <item>
      <title>proc tabulate percentage per column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-percentage-per-column/m-p/874421#M345480</link>
      <description>&lt;P&gt;Hi experts&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;i'm trying to get, at column level, the % represented by each cell, for each sub-group. code like this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc tabulate data=active_opp (where=(active_pipeline_&amp;amp;yy=1
and opp_class_cy="new_pipe" and quadrant in ("A"))) format=comma12.2 
missing;
   class 
   quadrant 
   account_industry
   cy_impact 
   status_class ;
   var sale_amount_usm;
   table (quadrant)*account_industry*(cy_impact all='Grand Total' ),

   (status_class all='Grand Total')*sale_amount_usm*
           (sum="Total"*{style={background=pipe_vol.}}
            pctn&amp;lt;cy_impact*sale_amount_usm
            cy_impact*status_class
            cy_impact*all
            all
            &amp;gt;)/rts=50
             ;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;However, the % at column levels do not reflect the proper percentage values, like below&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="15.png" style="width: 838px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/83693i4BB41959D1DC6819/image-size/large?v=v2&amp;amp;px=999" role="button" title="15.png" alt="15.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example: in column "open" the row "sourced" should be 76% but instead show a 56%. Any idea what I'm missing in the code?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Bests&lt;/P&gt;</description>
      <pubDate>Mon, 08 May 2023 10:29:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-percentage-per-column/m-p/874421#M345480</guid>
      <dc:creator>dcortell</dc:creator>
      <dc:date>2023-05-08T10:29:36Z</dc:date>
    </item>
    <item>
      <title>Re: proc tabulate percentage per column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-percentage-per-column/m-p/874428#M345481</link>
      <description>&lt;P&gt;I had to investigate more the pct statements but the following adjustments provided the proper % allocation in the table:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;data targets ;
infile datalines delimiter=',';
input quadrant account_industry cy_impact sale_amount_usm status_class ;
datalines;
1, 11, 0, 11, 11
1, 11, 1, 22, 111
2, 22, 0, 22, 22
2, 22, 1, 33, 222
2, 22, 2, 22, 222
;
run;




proc tabulate data=targets format=comma12.2 
missing;
   class 
   quadrant 
   account_industry
   cy_impact 
   status_class ;
   var sale_amount_usm;
   table (quadrant)*account_industry*(cy_impact all='Grand Total' ),

   (status_class all='Grand Total')*sale_amount_usm *
           (sum="Total"*{style={background=pipe_vol.}}
            pctsum&amp;lt;
            cy_impact*sale_amount_usm
            cy_impact*all
            all
            &amp;gt;)/rts=50
             ;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Mon, 08 May 2023 11:24:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-percentage-per-column/m-p/874428#M345481</guid>
      <dc:creator>dcortell</dc:creator>
      <dc:date>2023-05-08T11:24:34Z</dc:date>
    </item>
    <item>
      <title>Re: proc tabulate percentage per column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-percentage-per-column/m-p/874429#M345482</link>
      <description>&lt;DIV class="xisDoc-refProc"&gt;
&lt;DIV class="xisDoc-topic"&gt;
&lt;P class="xisDoc-paragraph"&gt;PCTSUM ?&lt;/P&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 08 May 2023 11:29:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-percentage-per-column/m-p/874429#M345482</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2023-05-08T11:29:05Z</dc:date>
    </item>
    <item>
      <title>Re: proc tabulate percentage per column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-percentage-per-column/m-p/874430#M345483</link>
      <description>Hey buddy. It worked for me yes</description>
      <pubDate>Mon, 08 May 2023 11:32:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-percentage-per-column/m-p/874430#M345483</guid>
      <dc:creator>dcortell</dc:creator>
      <dc:date>2023-05-08T11:32:36Z</dc:date>
    </item>
    <item>
      <title>Re: proc tabulate percentage per column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-percentage-per-column/m-p/874435#M345484</link>
      <description>&lt;P&gt;"&lt;SPAN&gt;PCTSUM ?&lt;/SPAN&gt;" - meaning "why not &lt;SPAN&gt;PCTSUM ?&lt;/SPAN&gt;" &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 08 May 2023 12:01:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-percentage-per-column/m-p/874435#M345484</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2023-05-08T12:01:54Z</dc:date>
    </item>
    <item>
      <title>Re: proc tabulate percentage per column</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-percentage-per-column/m-p/874438#M345486</link>
      <description>ahahahah I got it &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt;</description>
      <pubDate>Mon, 08 May 2023 12:25:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-tabulate-percentage-per-column/m-p/874438#M345486</guid>
      <dc:creator>dcortell</dc:creator>
      <dc:date>2023-05-08T12:25:57Z</dc:date>
    </item>
  </channel>
</rss>

