<?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 FREQ in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/PROC-FREQ/m-p/708890#M217879</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
input portfolio $ indicator $;
cards;
bank A
BANK N
RPL Y
OIL R
bank R
BANK Y
RPL A
OIL A
THD A
SEARS R
BANK R
MACYS A
MACYS R
;
RUN;

proc tabulate data=test;
class portfolio indicator;
classlev portfolio/style=data;
table portfolio=' ' all*{style=header}, 
      indicator=' ' all/box='portfolio' misstext='0';
keylabel n=' ' all='Total';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="x.png" style="width: 268px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/53154iFA459F4B8C569080/image-size/large?v=v2&amp;amp;px=999" role="button" title="x.png" alt="x.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 31 Dec 2020 14:07:11 GMT</pubDate>
    <dc:creator>Ksharp</dc:creator>
    <dc:date>2020-12-31T14:07:11Z</dc:date>
    <item>
      <title>PROC FREQ</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-FREQ/m-p/708880#M217878</link>
      <description>&lt;P&gt;Hi Team ,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I need to customized a report in the attached manner . Please suggest way to do color format with proc freq cross tabulation&lt;/P&gt;&lt;P&gt;Below is the attached sample data&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
input portfolio$ indicator$;
cards;
bank A
BANK N
RPL Y
OIL R
bank R
BANK Y
RPL A
OIL A
THD A
SEARS R
BANK R
MACYS A
MACYS R
;
RUN;

ods excel file="/risk/sbs/si/users/crm3e/reports/CRM_Other_Reports.xlsx" 
options ( sheet_name='Reports' sheet_interval='none' embedded_titles='yes');
title bold h=16pt f='ARIAL' color=BLACK 'Migration' ;
PROC FREQ DATA=TEST;
TABLES portfolio* indicator/nocol nopercent norow ;
RUN;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Required output is attached&amp;nbsp;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="RESULT.PNG" style="width: 407px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/53151iF033A23AE01A694E/image-size/large?v=v2&amp;amp;px=999" role="button" title="RESULT.PNG" alt="RESULT.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, 31 Dec 2020 12:28:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-FREQ/m-p/708880#M217878</guid>
      <dc:creator>ss171</dc:creator>
      <dc:date>2020-12-31T12:28:58Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FREQ</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-FREQ/m-p/708890#M217879</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
input portfolio $ indicator $;
cards;
bank A
BANK N
RPL Y
OIL R
bank R
BANK Y
RPL A
OIL A
THD A
SEARS R
BANK R
MACYS A
MACYS R
;
RUN;

proc tabulate data=test;
class portfolio indicator;
classlev portfolio/style=data;
table portfolio=' ' all*{style=header}, 
      indicator=' ' all/box='portfolio' misstext='0';
keylabel n=' ' all='Total';
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="x.png" style="width: 268px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/53154iFA459F4B8C569080/image-size/large?v=v2&amp;amp;px=999" role="button" title="x.png" alt="x.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Dec 2020 14:07:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-FREQ/m-p/708890#M217879</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2020-12-31T14:07:11Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FREQ</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-FREQ/m-p/708895#M217880</link>
      <description>Thanks for the solution .&lt;BR /&gt;Can I change background color as well in the heading and Total results . I tried to use in class statement but it does not work there</description>
      <pubDate>Thu, 31 Dec 2020 14:42:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-FREQ/m-p/708895#M217880</guid>
      <dc:creator>ss171</dc:creator>
      <dc:date>2020-12-31T14:42:23Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FREQ</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-FREQ/m-p/708899#M217881</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/300897"&gt;@ss171&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;Thanks for the solution .&lt;BR /&gt;Can I change background color as well in the heading and Total results . I tried to use in class statement but it does not work there&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Background colors where? Rules ?&lt;/P&gt;
&lt;P&gt;In row or column headings this would typically be done in a CLASSLEV statement. If you tried that show the code you used and describe why that wasn't successful.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If in the body of the table then a style override for the specific statistic(s) might be involved, but need to know exactly where you want things colored.&lt;/P&gt;</description>
      <pubDate>Thu, 31 Dec 2020 15:32:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-FREQ/m-p/708899#M217881</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2020-12-31T15:32:39Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FREQ</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-FREQ/m-p/708901#M217883</link>
      <description>Need to format column heading and last row where it represents Total in different color format image attached above . How can I modify code for that&lt;BR /&gt;</description>
      <pubDate>Thu, 31 Dec 2020 15:43:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-FREQ/m-p/708901#M217883</guid>
      <dc:creator>ss171</dc:creator>
      <dc:date>2020-12-31T15:43:05Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FREQ</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-FREQ/m-p/708903#M217885</link>
      <description>&lt;P&gt;Hi:&lt;/P&gt;
&lt;P&gt;&amp;nbsp; Yes, you'll have to use more style overrides ... not in the CLASS statement. I made each override a different color so you could see which overrides controlled which cells. If you want them all to be lightcyan in color, then you have to change each override.&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
proc tabulate data=test;
class portfolio indicator;
classlev portfolio/style=data{background=verylightgray};
classlev indicator / style={background=lightyellow};
table portfolio=' ' all*{style=header{background=lightgreen}}, 
      indicator=' ' all/ misstext='0'
      box={label='portfolio' style={background=lightred}};
keylabel n=' ' all='Total';
keyword all / style={background=lightcyan};
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;OR, you could switch to PROC REPORT:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;
options missing=0;
proc report data=test 
  style(header)={background=lightcyan}
  style(summary)={background=lightcyan};
  column portfolio n,indicator n=tot;
  define portfolio / group 'Portfolio';
  define indicator / across ' ';
  define n / ' ';
  define tot / 'Total';
  rbreak after / summarize;
  compute after;
    portfolio = 'Total';
  endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;In the PROC REPORT, I made everything light cyan in color.&lt;/P&gt;
&lt;P&gt;Cynthia&lt;/P&gt;</description>
      <pubDate>Thu, 31 Dec 2020 16:02:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-FREQ/m-p/708903#M217885</guid>
      <dc:creator>Cynthia_sas</dc:creator>
      <dc:date>2020-12-31T16:02:10Z</dc:date>
    </item>
    <item>
      <title>Re: PROC FREQ</title>
      <link>https://communities.sas.com/t5/SAS-Programming/PROC-FREQ/m-p/708982#M217923</link>
      <description>Thanks !!</description>
      <pubDate>Fri, 01 Jan 2021 07:19:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/PROC-FREQ/m-p/708982#M217923</guid>
      <dc:creator>ss171</dc:creator>
      <dc:date>2021-01-01T07:19:12Z</dc:date>
    </item>
  </channel>
</rss>

