<?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: need help creating a summary - Updated information in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/need-help-creating-a-summary/m-p/823855#M325340</link>
    <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/17300"&gt;@Elliott&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thank you this is wonderful, as for the last column it is supposed to be the % of mismatches.&amp;nbsp; I need to add that.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Then why is it included as a subheading under the group heading titled "% of match by aging bucket"?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that is just a layout error, then in the DATA NEED step, make a new dummy variable "mismatch_dummy", with a one for mismatch, and zero otherwise.&amp;nbsp; In proc tabulate, add the mismatch_dummy as an analysis variable, and ask for its mean with a PERCENT display.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, how would the code change if they actually wanted a count on buckets instead of %match?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Since the %match values are nothing more than the mean of a bunch of 1's (match) and 0's for the analysis variable (not class variable) &lt;EM&gt;&lt;STRONG&gt;match_dummy&lt;/STRONG&gt;&lt;/EM&gt; (which I called match_pct in my earlier note), then to get a "count" of matches instead, replace the code requesting a &lt;U&gt;&lt;EM&gt;&lt;STRONG&gt;mean&lt;/STRONG&gt;&lt;/EM&gt;&lt;/U&gt; to a request for a &lt;U&gt;&lt;EM&gt;&lt;STRONG&gt;sum&lt;/STRONG&gt;&lt;/EM&gt;&lt;/U&gt;.&amp;nbsp; The sum of all those 1's will be the same as a count of those 1's.&amp;nbsp; Don't forget to change the associated format request.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is a common "trick" to use with proc tabulate.&amp;nbsp;&amp;nbsp;If match_dummy had been declared a class variable - which might have been the intuitive instinct, then proc tabulate would generate two columns (or rows) for it - one for the 0's and one for the 1's.&amp;nbsp; B&lt;U&gt;ut you want only one column&lt;/U&gt;.&amp;nbsp; Using match_dummy as an analysis variable, and coding it only as 1's and 0's allows you to replicate a count (which is the normal use of a class variable) with a sum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Of course, the same was done with the mismatch_dummy variable, except you want a mean instead of a sum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To make the code clearer, take away all the quoted elements, and maybe the formats - then you'll see the operational code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data work.summary_data;
  infile datalines dlm=',' dsd truncover;
  length PendingNo $9 CrUnit $5 Store $5 match $10 bucket $5 Rulechar $1 Rule 3 ;
  input PendingNo CrUnit Store match bucket Rulechar $ Rule 1.  ;
datalines;
253864481,4730,4,MATCH,0-5,2,2
212777089,4730,4,NOMATCH,0-5,,
301172842,4730,11,MATCH,0-5,4,4
281739414,4730,14,MATCH,6-15,1,1
261300392,4730,14,MATCH,0-5,4,4
288475892,4730,14,MATCH,0-5,4,4
313076925,4730,14,MATCH,0-5,4,4
23131926,4730,14,MATCH,0-5,4,4
273107812,4730,58,MATCH,0-5,3,3
226270010,4730,70,MATCH,0-5,1,1
276177164,4730,70,MATCH,0-5,1,1
92644582,4730,70,MATCH,0-5,1,1
137788903,4730,70,MATCH,0-5,1,1
63797089,4730,70,MATCH,0-5,1,1
114514092,4730,70,MATCH,6-15,1,1
159810023,4730,70,MATCH,0-5,1,1
239028597,4730,70,MATCH,6-15,1,1
291638142,4730,70,MATCH,0-5,1,1
306576926,4730,70,MATCH,0-5,2,2
184156646,4730,70,MATCH,0-5,3,3
214132768,4730,70,MATCH,0-5,3,3
51683419,4730,70,MATCH,0-5,3,3
137563134,4730,70,MATCH,0-5,3,3
217461698,4730,70,MATCH,0-5,3,3
109113011,4730,70,MATCH,0-5,3,3
149173652,4730,70,MATCH,0-5,3,3
154079135,4730,70,MATCH,0-5,3,3
189377914,4730,70,MATCH,0-5,3,3
204766847,4730,70,MATCH,0-5,3,3
189066497,4730,70,MATCH,0-5,4,4
251583641,4730,70,MATCH,0-5,4,4
306428966,4730,70,MATCH,0-5,4,4
46074769,4730,70,MATCH,0-5,4,4
72116021,4730,70,MATCH,0-5,4,4
112755683,4730,70,MATCH,0-5,4,4
112963673,4730,70,MATCH,0-5,4,4
147893714,4730,70,MATCH,0-5,4,4
162142576,4730,70,MATCH,0-5,4,4
233991350,4730,70,MATCH,0-5,4,4
283368603,4730,70,MATCH,0-5,4,4
38519097,4730,70,MATCH,0-5,4,4
78059359,4730,70,MATCH,0-5,4,4
104160371,4730,130,MATCH,0-5,4,4
119392631,4730,130,MATCH,0-5,4,4
184920636,4730,130,MATCH,0-5,4,4
81757207,4730,130,MATCH,0-5,4,4
96275766,4730,130,MATCH,0-5,4,4
96633756,4730,130,MATCH,0-5,4,4
214350928,4730,139,MATCH,0-5,1,1
13148566,4730,139,MATCH,0-5,3,3
164847505,4730,139,MATCH,0-5,4,4
184356706,4730,139,MATCH,0-5,4,4
67873620,4730,139,MATCH,0-5,4,4
72534031,4730,139,MATCH,0-5,4,4
102649143,4730,139,MATCH,0-5,4,4
182921667,4730,139,MATCH,0-5,4,4
207836158,4730,139,MATCH,0-5,4,4
238375000,4730,139,MATCH,0-5,4,4
278454232,4730,139,MATCH,0-5,4,4
298747613,4730,139,MATCH,0-5,4,4
251074531,4730,139,NOMATCH,0-5,,
293309254,4730,139,NOMATCH,0-5,,
204006727,4730,139,NOMATCH,0-5,,
106813447,4730,139,NOMATCH,0-5,,
43030128,4730,140,MATCH,6-15,1,1
291264232,4730,140,MATCH,0-5,1,1
296210900,4730,140,MATCH,0-5,2,2
99259380,4730,140,MATCH,16-30,3,3
51328329,4730,143,MATCH,16-30,1,1
run;


data need / view=need;
  set work.summary_data ;

  /*Put a leading space in front of '0-5' and '6-15' so that
    lexicographic order replicates the intended age group order*/
  if bucket='0-5' then bucket=' 0-5';
  else if bucket='6-15' then bucket=' 6-15';

  if rule=. then do;
    rule=99 ; /*Use for mismatch*/
    match_dummy=0;
  end;
  else match_dummy=1;

  mismatch_dummy=1-match_dummy;

  /*Right justify STORE variable to get expected sort order*/
  store=right(store); 
run ;


proc format ;
  value rulefmt   99='MisMatch'  other=[1.] ;
run;

proc tabulate data =need;
  class rule store bucket ;
  var match_dummy mismatch_dummy;
  table   store
        , rule*n=' '*f=comma6.0
          all='Total'*N=''*f=comma6.0
          match_dummy='% of Match by Aging Bucket'*bucket=' '*sum=' '*f=comma6.0
          mismatch_dummy='MisMatch %'*mean=' '*f=percent5.;
  format rule rulefmt. ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 18 Jul 2022 14:48:34 GMT</pubDate>
    <dc:creator>mkeintz</dc:creator>
    <dc:date>2022-07-18T14:48:34Z</dc:date>
    <item>
      <title>need help creating a summary</title>
      <link>https://communities.sas.com/t5/SAS-Programming/need-help-creating-a-summary/m-p/823592#M325203</link>
      <description>&lt;P&gt;I have data that I need to convert to a summary with counts for rule (the number or records in each rule by store) and also a % of match by the bucket value.&lt;/P&gt;
&lt;P&gt;I am do not know how to convert to summary like the example below.&amp;nbsp; I have tried proc tabulate and proc transpose but have not been able to get the desired results.&lt;/P&gt;
&lt;P&gt;any assistance will be greatly appreciated.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks, Elliott&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I need it to look like this with counts for rule level and number mismatch and total&amp;nbsp;&lt;/P&gt;
&lt;P&gt;the on the right the percent of bucket aging match/mismatch&lt;/P&gt;
&lt;P&gt;Want:&lt;/P&gt;
&lt;TABLE class="x_MsoNormalTable" border="0" cellspacing="0" cellpadding="0"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="38" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD colspan="7" width="173" valign="bottom"&gt;
&lt;P class="x_MsoNormal" align="center"&gt;&lt;STRONG&gt;&lt;SPAN&gt;Count by matching Rule Level&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="24" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD colspan="6" width="221" valign="bottom"&gt;
&lt;P class="x_MsoNormal" align="center"&gt;&lt;STRONG&gt;&lt;SPAN&gt;% of match by aging bucket&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="38" valign="bottom"&gt;
&lt;P class="x_MsoNormal"&gt;&lt;STRONG&gt;&lt;SPAN&gt;Store#&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="23" valign="bottom"&gt;
&lt;P class="x_MsoNormal" align="center"&gt;&lt;STRONG&gt;&lt;SPAN&gt;1&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="16" valign="bottom"&gt;
&lt;P class="x_MsoNormal" align="center"&gt;&lt;STRONG&gt;&lt;SPAN&gt;2&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="16" valign="bottom"&gt;
&lt;P class="x_MsoNormal" align="center"&gt;&lt;STRONG&gt;&lt;SPAN&gt;3&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="16" valign="bottom"&gt;
&lt;P class="x_MsoNormal" align="center"&gt;&lt;STRONG&gt;&lt;SPAN&gt;4&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="16" valign="bottom"&gt;
&lt;P class="x_MsoNormal" align="center"&gt;&lt;STRONG&gt;&lt;SPAN&gt;5&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="16" valign="bottom"&gt;
&lt;P class="x_MsoNormal" align="center"&gt;&lt;STRONG&gt;&lt;SPAN&gt;6&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="71" valign="bottom"&gt;
&lt;P class="x_MsoNormal"&gt;&lt;STRONG&gt;&lt;SPAN&gt;Mis-match&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="24" valign="bottom"&gt;
&lt;P class="x_MsoNormal"&gt;&lt;SPAN&gt;Total&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="26" valign="bottom"&gt;
&lt;P class="x_MsoNormal" align="center"&gt;&lt;STRONG&gt;&lt;SPAN&gt;0-5&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="30" valign="bottom"&gt;
&lt;P class="x_MsoNormal" align="center"&gt;&lt;STRONG&gt;&lt;SPAN&gt;6-15&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="39" valign="bottom"&gt;
&lt;P class="x_MsoNormal" align="center"&gt;&lt;STRONG&gt;&lt;SPAN&gt;16-30&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="39" valign="bottom"&gt;
&lt;P class="x_MsoNormal" align="center"&gt;&lt;STRONG&gt;&lt;SPAN&gt;31-60&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="35" valign="bottom"&gt;
&lt;P class="x_MsoNormal" align="center"&gt;&lt;STRONG&gt;&lt;SPAN&gt;&amp;gt;60&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="52" valign="bottom"&gt;
&lt;P class="x_MsoNormal"&gt;&lt;SPAN&gt;Mismatch&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="38" valign="bottom"&gt;
&lt;P class="x_MsoNormal"&gt;&lt;SPAN&gt;00070&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="23" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="16" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="16" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="16" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="16" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="16" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="71" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="24" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="26" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="30" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="39" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="39" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="35" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="52" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="38" valign="bottom"&gt;
&lt;P class="x_MsoNormal"&gt;&lt;SPAN&gt;00144&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="23" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="16" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="16" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="16" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="16" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="16" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="71" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="24" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="26" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="30" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="39" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="39" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="35" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="52" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="38" valign="bottom"&gt;
&lt;P class="x_MsoNormal"&gt;&lt;SPAN&gt;00145&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="23" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="16" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="16" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="16" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="16" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="16" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="71" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="24" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="26" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="30" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="39" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="39" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="35" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="52" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="38" valign="bottom"&gt;
&lt;P class="x_MsoNormal"&gt;&lt;SPAN&gt;00163&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="23" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="16" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="16" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="16" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="16" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="16" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="71" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="24" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="26" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="30" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="39" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="39" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="35" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="52" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="38" valign="bottom"&gt;
&lt;P class="x_MsoNormal"&gt;&lt;SPAN&gt;00175&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="23" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="16" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="16" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="16" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="16" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="16" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="71" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="24" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="26" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="30" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="39" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="39" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="35" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="52" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="38" valign="bottom"&gt;
&lt;P class="x_MsoNormal"&gt;&lt;SPAN&gt;00251&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="23" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="16" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="16" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="16" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="16" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="16" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="71" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="24" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="26" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="30" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="39" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="39" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="35" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="52" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="38" valign="bottom"&gt;
&lt;P class="x_MsoNormal"&gt;&lt;SPAN&gt;00301&lt;/SPAN&gt;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="23" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="16" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="16" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="16" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="16" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="16" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="71" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="24" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="26" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="30" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="39" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="39" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="35" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;TD width="52" valign="bottom"&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Data I have looks like this:&lt;/P&gt;
&lt;P&gt;Store Rule bktdays match bucket&lt;BR /&gt;00004 NOMATCH 0-5&lt;BR /&gt;00004 2 3 MATCH 0-5&lt;BR /&gt;00011 4 -75 MATCH 0-5&lt;BR /&gt;00014 4 -10 MATCH 0-5&lt;BR /&gt;00014 1 8 MATCH 6-15&lt;BR /&gt;00014 4 -42 MATCH 0-5&lt;BR /&gt;00014 4 -45 MATCH 0-5&lt;BR /&gt;00014 4 -47 MATCH 0-5&lt;BR /&gt;00058 3 0 MATCH 0-5&lt;BR /&gt;00070 5 -1 MATCH 0-5&lt;BR /&gt;00070 3 0 MATCH 0-5&lt;BR /&gt;00070 4 -2 MATCH 0-5&lt;BR /&gt;00070 3 0 MATCH 0-5&lt;BR /&gt;00070 1 0 MATCH 0-5&lt;BR /&gt;00070 4 -9 MATCH 0-5&lt;BR /&gt;00070 1 5 MATCH 0-5&lt;BR /&gt;00070 4 -14 MATCH 0-5&lt;BR /&gt;00070 2 2 MATCH 0-5&lt;BR /&gt;00070 4 -18 MATCH 0-5&lt;BR /&gt;00070 3 0 MATCH 0-5&lt;BR /&gt;00070 4 -21 MATCH 0-5&lt;BR /&gt;00070 1 0 MATCH 0-5&lt;BR /&gt;00070 4 -25 MATCH 0-5&lt;BR /&gt;00070 4 -25 MATCH 0-5&lt;BR /&gt;00070 3 3 MATCH 0-5&lt;BR /&gt;00070 1 1 MATCH 0-5&lt;BR /&gt;00070 4 -28 MATCH 0-5&lt;BR /&gt;00070 4 -30 MATCH 0-5&lt;BR /&gt;00070 3 2 MATCH 0-5&lt;BR /&gt;00070 4 0 MATCH 0-5&lt;BR /&gt;00070 4 -42 MATCH 0-5&lt;BR /&gt;00070 4 -48 MATCH 0-5&lt;BR /&gt;00070 1 0 MATCH 0-5&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data have;&lt;BR /&gt;infile datalines dlm=',' dsd;&lt;BR /&gt;length Store $5 Rule 1. bktdays8. match $10 bucket $5;&lt;BR /&gt;input store match bucket $ rule 1. bktdays 8.;&lt;BR /&gt;datalines;&lt;BR /&gt;00004,,,,NOMATCH,0-5&lt;BR /&gt;00004,,2,3,MATCH,0-5&lt;BR /&gt;00011,,4,-75,MATCH,0-5&lt;BR /&gt;00014,,4,-10,MATCH,0-5&lt;BR /&gt;00014,,1,8,MATCH,6-15&lt;BR /&gt;00014,,4,82,MATCH,61-90&lt;BR /&gt;00014,,4,45,MATCH,31-60&lt;BR /&gt;00014,4,47,MATCH,31-60&lt;BR /&gt;00058,3,0,MATCH,0-5&lt;BR /&gt;00070,5,-1,MATCH,0-5&lt;BR /&gt;00070,3,0,MATCH,0-5&lt;BR /&gt;00070,4,-2,MATCH,0-5&lt;BR /&gt;00070,3,0,MATCH,0-5&lt;BR /&gt;00070,1,0,MATCH,0-5&lt;BR /&gt;00070,4,-9,MATCH,0-5&lt;BR /&gt;00070,1,5,MATCH,0-5&lt;BR /&gt;00070,,-14,NOMATCH,0-5&lt;BR /&gt;00070,2,2,MATCH,0-5&lt;BR /&gt;00070,4,-18,MATCH,0-5&lt;BR /&gt;00072,3,0,MATCH,0-5&lt;BR /&gt;00072,4,21,MATCH,16-30&lt;BR /&gt;00073,1,0,MATCH,0-5&lt;BR /&gt;00073,4,25,MATCH,16-30&lt;BR /&gt;00073,4,25,MATCH,16-30&lt;BR /&gt;00074,3,3,MATCH,0-5&lt;BR /&gt;00074,1,1,MATCH,0-5&lt;BR /&gt;00074,4,58,MATCH,31-60&lt;BR /&gt;00075,4,30,MATCH,16-30&lt;BR /&gt;00075,3,2,MATCH,0-5&lt;BR /&gt;00075,4,0,MATCH,0-5&lt;BR /&gt;00076,4,92,MATCH,&amp;gt;90&lt;BR /&gt;00076,4,48,MATCH,31-60&lt;BR /&gt;00076,1,0,MATCH,0-5&lt;BR /&gt;00077,4,52,MATCH,31-60&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&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>Fri, 15 Jul 2022 23:31:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/need-help-creating-a-summary/m-p/823592#M325203</guid>
      <dc:creator>Elliott</dc:creator>
      <dc:date>2022-07-15T23:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: need help creating a summary</title>
      <link>https://communities.sas.com/t5/SAS-Programming/need-help-creating-a-summary/m-p/823594#M325205</link>
      <description>&lt;P&gt;Please revise your DATA HAVE step into a working piece of code.&amp;nbsp; Among other issues, your datalines do not all have the same number of csv value (i.e. they don't have the same number of commas).&amp;nbsp; There are other errors too that make it a bit ambiguous as to what advice to give you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please fix so that it runs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;And then post it via the "running man" icon.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Jul 2022 00:00:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/need-help-creating-a-summary/m-p/823594#M325205</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2022-07-16T00:00:15Z</dc:date>
    </item>
    <item>
      <title>Re: need help creating a summary</title>
      <link>https://communities.sas.com/t5/SAS-Programming/need-help-creating-a-summary/m-p/823626#M325223</link>
      <description>&lt;P&gt;here is the corrected data lines:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;

infile datalines dlm=',' dsd;

length Store $5 Rule $1 bktdays 8. match $10 bucket $5;

input store rule $ bktdays match $ bucket $ ;

datalines;

00004,,0,NOMATCH,0-5

00004,2,3,MATCH,0-5

00011,4,-75,MATCH,0-5

00014,4,-10,MATCH,0-5

00014,1,8,MATCH,6-15

00014,4,82,MATCH,61-90

00014,4,45,MATCH,31-60

00014,4,47,MATCH,31-60

00058,3,0,MATCH,0-5

00070,5,-1,MATCH,0-5

00070,3,0,MATCH,0-5

00070,4,-2,MATCH,0-5

00070,3,0,MATCH,0-5

00070,1,0,MATCH,0-5

00070,4,-9,MATCH,0-5

00070,1,5,MATCH,0-5

00070,,-14,NOMATCH,0-5

00070,2,2,MATCH,0-5

00070,4,-18,MATCH,0-5

00072,3,0,MATCH,0-5

00072,4,21,MATCH,16-30

00073,1,0,MATCH,0-5

00073,4,25,MATCH,16-30

00073,4,25,MATCH,16-30

00074,3,3,MATCH,0-5

00074,1,1,MATCH,0-5

00074,4,58,MATCH,31-60

00075,4,30,MATCH,16-30

00075,3,2,MATCH,0-5

00075,4,0,MATCH,0-5

00076,4,92,MATCH,&amp;gt;90

00076,4,48,MATCH,31-60

00076,1,0,MATCH,0-5

00077,4,52,MATCH,31-60

;

run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sat, 16 Jul 2022 10:50:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/need-help-creating-a-summary/m-p/823626#M325223</guid>
      <dc:creator>Elliott</dc:creator>
      <dc:date>2022-07-16T10:50:30Z</dc:date>
    </item>
    <item>
      <title>Re: need help creating a summary</title>
      <link>https://communities.sas.com/t5/SAS-Programming/need-help-creating-a-summary/m-p/823627#M325224</link>
      <description>&lt;P&gt;I just tried your code, it does not work. Please test the code and confirm that it works.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Jul 2022 10:57:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/need-help-creating-a-summary/m-p/823627#M325224</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2022-07-16T10:57:22Z</dc:date>
    </item>
    <item>
      <title>Re: need help creating a summary</title>
      <link>https://communities.sas.com/t5/SAS-Programming/need-help-creating-a-summary/m-p/823629#M325226</link>
      <description>&lt;P&gt;What does "mismatch" mean?&lt;/P&gt;</description>
      <pubDate>Sat, 16 Jul 2022 11:35:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/need-help-creating-a-summary/m-p/823629#M325226</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2022-07-16T11:35:17Z</dc:date>
    </item>
    <item>
      <title>Re: need help creating a summary</title>
      <link>https://communities.sas.com/t5/SAS-Programming/need-help-creating-a-summary/m-p/823631#M325228</link>
      <description>the initial data before it was reduced to this data was to match record from 2 different data sets, the match/nomatch indicates if a match was found.</description>
      <pubDate>Sat, 16 Jul 2022 12:01:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/need-help-creating-a-summary/m-p/823631#M325228</guid>
      <dc:creator>Elliott</dc:creator>
      <dc:date>2022-07-16T12:01:51Z</dc:date>
    </item>
    <item>
      <title>Re: need help creating a summary</title>
      <link>https://communities.sas.com/t5/SAS-Programming/need-help-creating-a-summary/m-p/823632#M325229</link>
      <description>update to code has already been posted, sorry for the inconvenience&lt;BR /&gt;</description>
      <pubDate>Sat, 16 Jul 2022 12:02:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/need-help-creating-a-summary/m-p/823632#M325229</guid>
      <dc:creator>Elliott</dc:creator>
      <dc:date>2022-07-16T12:02:26Z</dc:date>
    </item>
    <item>
      <title>Re: need help creating a summary</title>
      <link>https://communities.sas.com/t5/SAS-Programming/need-help-creating-a-summary/m-p/823645#M325233</link>
      <description>&lt;P&gt;You need to provide a bit of information as to exactly what "TOTAL" and "% of match by the bucket value" means. I might guess that Total is a count of records for the store but in case it is something else. But the requested percentage needs a clear definition of what each numerator and denominator used should be especially since you seem to imply that MISMATCH is a category under Bucket when it is a different variable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I suspect that your data is in for some significant reformatting and/or additional variables to get a report like that.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Jul 2022 15:21:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/need-help-creating-a-summary/m-p/823645#M325233</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2022-07-16T15:21:34Z</dc:date>
    </item>
    <item>
      <title>Re: need help creating a summary</title>
      <link>https://communities.sas.com/t5/SAS-Programming/need-help-creating-a-summary/m-p/823668#M325243</link>
      <description>&lt;P&gt;here are some more details that may help, this is an image of the sample the report requestor provided:&lt;/P&gt;
&lt;DIV id="tinyMceEditorElliott_0" class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;P class="x_MsoNormal"&gt;Column H: is the number of mismatch or nomatch records for that store number.&lt;/P&gt;
&lt;P class="x_MsoNormal"&gt;Column J: %mismatch =H18/I18&lt;/P&gt;
&lt;P class="x_MsoNormal"&gt;Column I:&amp;nbsp; Total of (both match and mismatched) is the number of records for 1-6 + #of mismatch&lt;/P&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="x_MsoNormal"&gt;Starting at column K:&lt;/P&gt;
&lt;P class="x_MsoNormal"&gt;% of matched by aging bucket?&amp;nbsp; - 7 matched out of 35 (sum of 1-6=7)/total? 7/35=.2 or 20%&lt;/P&gt;
&lt;P class="x_MsoNormal" aria-hidden="true"&gt;The example shows 7 but they ask for a % so should show 20%&lt;/P&gt;
&lt;P class="x_MsoNormal"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="x_MsoNormal"&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="image004.jpg" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/73363iD86EEC87A825088D/image-size/large?v=v2&amp;amp;px=999" role="button" title="image004.jpg" alt="image004.jpg" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P class="x_MsoNormal"&gt;&amp;nbsp;&lt;/P&gt;
&lt;P class="x_MsoNormal"&gt;In the original sample I provided the format was a little different.&amp;nbsp; but I think they just moved the mismatch% to the end of the buckets.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you all for your help with this&lt;/P&gt;</description>
      <pubDate>Sat, 16 Jul 2022 22:46:22 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/need-help-creating-a-summary/m-p/823668#M325243</guid>
      <dc:creator>Elliott</dc:creator>
      <dc:date>2022-07-16T22:46:22Z</dc:date>
    </item>
    <item>
      <title>need help creating a summary - Updated information</title>
      <link>https://communities.sas.com/t5/SAS-Programming/need-help-creating-a-summary/m-p/823748#M325298</link>
      <description>&lt;P&gt;I have worked on this all day and am making some progress but still need some help.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data work.summary_data;
  infile datalines dlm=',' dsd truncover;
  length PendingNo $9 CrUnit $5 Store $5 match $10 bucket $5 Rulechar $1 Rule 3 ;
  input PendingNo CrUnit Store match bucket Rulechar $ Rule 1.  ;
  datalines;
253864481,4730,4,MATCH,0-5,2,2
212777089,4730,4,NOMATCH,0-5,,
301172842,4730,11,MATCH,0-5,4,4
281739414,4730,14,MATCH,6-15,1,1
261300392,4730,14,MATCH,0-5,4,4
288475892,4730,14,MATCH,0-5,4,4
313076925,4730,14,MATCH,0-5,4,4
23131926,4730,14,MATCH,0-5,4,4
273107812,4730,58,MATCH,0-5,3,3
226270010,4730,70,MATCH,0-5,1,1
276177164,4730,70,MATCH,0-5,1,1
92644582,4730,70,MATCH,0-5,1,1
137788903,4730,70,MATCH,0-5,1,1
63797089,4730,70,MATCH,0-5,1,1
114514092,4730,70,MATCH,6-15,1,1
159810023,4730,70,MATCH,0-5,1,1
239028597,4730,70,MATCH,6-15,1,1
291638142,4730,70,MATCH,0-5,1,1
306576926,4730,70,MATCH,0-5,2,2
184156646,4730,70,MATCH,0-5,3,3
214132768,4730,70,MATCH,0-5,3,3
51683419,4730,70,MATCH,0-5,3,3
137563134,4730,70,MATCH,0-5,3,3
217461698,4730,70,MATCH,0-5,3,3
109113011,4730,70,MATCH,0-5,3,3
149173652,4730,70,MATCH,0-5,3,3
154079135,4730,70,MATCH,0-5,3,3
189377914,4730,70,MATCH,0-5,3,3
204766847,4730,70,MATCH,0-5,3,3
189066497,4730,70,MATCH,0-5,4,4
251583641,4730,70,MATCH,0-5,4,4
306428966,4730,70,MATCH,0-5,4,4
46074769,4730,70,MATCH,0-5,4,4
72116021,4730,70,MATCH,0-5,4,4
112755683,4730,70,MATCH,0-5,4,4
112963673,4730,70,MATCH,0-5,4,4
147893714,4730,70,MATCH,0-5,4,4
162142576,4730,70,MATCH,0-5,4,4
233991350,4730,70,MATCH,0-5,4,4
283368603,4730,70,MATCH,0-5,4,4
38519097,4730,70,MATCH,0-5,4,4
78059359,4730,70,MATCH,0-5,4,4
104160371,4730,130,MATCH,0-5,4,4
119392631,4730,130,MATCH,0-5,4,4
184920636,4730,130,MATCH,0-5,4,4
81757207,4730,130,MATCH,0-5,4,4
96275766,4730,130,MATCH,0-5,4,4
96633756,4730,130,MATCH,0-5,4,4
214350928,4730,139,MATCH,0-5,1,1
13148566,4730,139,MATCH,0-5,3,3
164847505,4730,139,MATCH,0-5,4,4
184356706,4730,139,MATCH,0-5,4,4
67873620,4730,139,MATCH,0-5,4,4
72534031,4730,139,MATCH,0-5,4,4
102649143,4730,139,MATCH,0-5,4,4
182921667,4730,139,MATCH,0-5,4,4
207836158,4730,139,MATCH,0-5,4,4
238375000,4730,139,MATCH,0-5,4,4
278454232,4730,139,MATCH,0-5,4,4
298747613,4730,139,MATCH,0-5,4,4
251074531,4730,139,NOMATCH,0-5,,
293309254,4730,139,NOMATCH,0-5,,
204006727,4730,139,NOMATCH,0-5,,
106813447,4730,139,NOMATCH,0-5,,
43030128,4730,140,MATCH,6-15,1,1
291264232,4730,140,MATCH,0-5,1,1
296210900,4730,140,MATCH,0-5,2,2
99259380,4730,140,MATCH,16-30,3,3
51328329,4730,143,MATCH,16-30,1,1
;
run;

Proc tabulate data=summary_data;
title  "Rule Analysis";
   class store  /missing;
   class PendingNo rulechar bucket /missing;
   var rule;
   table store, rulechar * bucket
       (all='Total Records' rule=''*(n="# of Matches"))
       /misstext=' '
   ;
run;&lt;BR /&gt;&lt;BR /&gt;This&amp;nbsp;produces&amp;nbsp;part&amp;nbsp;of&amp;nbsp;what&amp;nbsp;I&amp;nbsp;need,&amp;nbsp;I&amp;nbsp;am&amp;nbsp;still&amp;nbsp;needing&amp;nbsp;to&amp;nbsp;know&amp;nbsp;how&amp;nbsp;to&amp;nbsp;create&amp;nbsp;the&amp;nbsp;%&amp;nbsp;of&amp;nbsp;mismatches&amp;nbsp;and&amp;nbsp;also&amp;nbsp;I&amp;nbsp;would&amp;nbsp;like&amp;nbsp;Rules&amp;nbsp;1&amp;nbsp;-&amp;nbsp;6&amp;nbsp;on&amp;nbsp;the&amp;nbsp;left&amp;nbsp;then&amp;nbsp;total&amp;nbsp;then&amp;nbsp;buckets&amp;nbsp;then&amp;nbsp;%mismatch.&lt;BR /&gt;&lt;BR /&gt;This&amp;nbsp;is&amp;nbsp;what&amp;nbsp;the&amp;nbsp;current&amp;nbsp;output&amp;nbsp;looks&amp;nbsp;like now, but I would like to have it look like what is below&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="This is what the query creates, but." style="width: 800px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/73378i92031545B4C9262B/image-size/large?v=v2&amp;amp;px=999" role="button" title="image004 (1).jpg" alt="This is what the query creates, but." /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;This is what the query creates, but.&lt;/span&gt;&lt;/span&gt;&lt;BR /&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="This is what I am trying to get to" style="width: 852px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/73380i9E2A16CAE68FD216/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="This is what I am trying to get to" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;This is what I am trying to get to&lt;/span&gt;&lt;/span&gt;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 17 Jul 2022 22:40:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/need-help-creating-a-summary/m-p/823748#M325298</guid>
      <dc:creator>Elliott</dc:creator>
      <dc:date>2022-07-17T22:40:48Z</dc:date>
    </item>
    <item>
      <title>Re: need help creating a summary - Updated information</title>
      <link>https://communities.sas.com/t5/SAS-Programming/need-help-creating-a-summary/m-p/823752#M325299</link>
      <description>&lt;P&gt;here are images of what I have and below is what I am trying to get to&lt;/P&gt;
&lt;P&gt;.&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="current query produces" style="width: 800px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/73381i30E130695F28B23C/image-size/large?v=v2&amp;amp;px=999" role="button" title="image004 (1).jpg" alt="current query produces" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;current query produces&lt;/span&gt;&lt;/span&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="where I am trying to get" style="width: 852px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/73382iFEFCC4CA21EC7324/image-size/large?v=v2&amp;amp;px=999" role="button" title="image.png" alt="where I am trying to get" /&gt;&lt;span class="lia-inline-image-caption" onclick="event.preventDefault();"&gt;where I am trying to get&lt;/span&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Sun, 17 Jul 2022 22:44:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/need-help-creating-a-summary/m-p/823752#M325299</guid>
      <dc:creator>Elliott</dc:creator>
      <dc:date>2022-07-17T22:44:23Z</dc:date>
    </item>
    <item>
      <title>Re: need help creating a summary - Updated information</title>
      <link>https://communities.sas.com/t5/SAS-Programming/need-help-creating-a-summary/m-p/823758#M325303</link>
      <description>&lt;P&gt;The below does what I think you want, except for the rightmost&amp;nbsp; column.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Assuming that there is a 1:1 equivalence between RULE being missing and a Mismatch status, then just make rule=99 for mis-match cases.&amp;nbsp; To make rule 99's print out as "mismatch" in your table, just assign a user-define format for RULE.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The match percentage by age bucket can be seen as the average of a variable&amp;nbsp; MATCH_PCT which takes on only two values: 1 (for matches) and 0 (mis-matches).&amp;nbsp; Ask tabulate to report the mean of those 1's and 0's, and apply then PERCENT. format to that mean.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;What is the rightmost column?&amp;nbsp; It's listed as part of a column group titled "% of Match by aging Bucket", yet that column is not an age group.&amp;nbsp; And it's not even a Match %, since it is headed "mismatch".&lt;/P&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;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data need / view=need;
  set work.summary_data ;

  /*Put a leading space in front of '0-5' and '6-15' so that
    lexicographic order replicates the intended age group order*/
  if bucket='0-5' then bucket=' 0-5';
  else if bucket='6-15' then bucket=' 6-15';

  if rule=. then do;
    rule=99 ; /*Use for mismatch*/
    match_pct=0;
  end;
  else match_pct=1;

  /*Right justify STORE variable to get expected sort order*/
  store=right(store); 
run ;


proc format ;
  value rulefmt   99='MisMatch'  other=[1.] ;
run;

proc tabulate data =need;
  class rule store bucket ;
  var match_pct;
  table   store
        , rule*n=' '*f=comma6.0
          all='Total'*n=' '*f=comma6.0
          match_pct='% of match by aging bucket'*bucket=' '*mean=' '*f=percent6.4 ;
  format rule rulefmt. ;
run;
&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;DIV class="branch"&gt;
&lt;DIV&gt;
&lt;DIV align="center"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Mon, 18 Jul 2022 01:28:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/need-help-creating-a-summary/m-p/823758#M325303</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2022-07-18T01:28:56Z</dc:date>
    </item>
    <item>
      <title>Re: need help creating a summary - Updated information</title>
      <link>https://communities.sas.com/t5/SAS-Programming/need-help-creating-a-summary/m-p/823804#M325328</link>
      <description>&lt;P&gt;Thank you this is wonderful, as for the last column it is supposed to be the % of mismatches.&amp;nbsp; I need to add that.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, how would the code change if they actually wanted a count on buckets instead of %match?&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 11:15:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/need-help-creating-a-summary/m-p/823804#M325328</guid>
      <dc:creator>Elliott</dc:creator>
      <dc:date>2022-07-18T11:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: need help creating a summary - Updated information</title>
      <link>https://communities.sas.com/t5/SAS-Programming/need-help-creating-a-summary/m-p/823855#M325340</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/17300"&gt;@Elliott&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Thank you this is wonderful, as for the last column it is supposed to be the % of mismatches.&amp;nbsp; I need to add that.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Then why is it included as a subheading under the group heading titled "% of match by aging bucket"?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If that is just a layout error, then in the DATA NEED step, make a new dummy variable "mismatch_dummy", with a one for mismatch, and zero otherwise.&amp;nbsp; In proc tabulate, add the mismatch_dummy as an analysis variable, and ask for its mean with a PERCENT display.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also, how would the code change if they actually wanted a count on buckets instead of %match?&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Since the %match values are nothing more than the mean of a bunch of 1's (match) and 0's for the analysis variable (not class variable) &lt;EM&gt;&lt;STRONG&gt;match_dummy&lt;/STRONG&gt;&lt;/EM&gt; (which I called match_pct in my earlier note), then to get a "count" of matches instead, replace the code requesting a &lt;U&gt;&lt;EM&gt;&lt;STRONG&gt;mean&lt;/STRONG&gt;&lt;/EM&gt;&lt;/U&gt; to a request for a &lt;U&gt;&lt;EM&gt;&lt;STRONG&gt;sum&lt;/STRONG&gt;&lt;/EM&gt;&lt;/U&gt;.&amp;nbsp; The sum of all those 1's will be the same as a count of those 1's.&amp;nbsp; Don't forget to change the associated format request.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This is a common "trick" to use with proc tabulate.&amp;nbsp;&amp;nbsp;If match_dummy had been declared a class variable - which might have been the intuitive instinct, then proc tabulate would generate two columns (or rows) for it - one for the 0's and one for the 1's.&amp;nbsp; B&lt;U&gt;ut you want only one column&lt;/U&gt;.&amp;nbsp; Using match_dummy as an analysis variable, and coding it only as 1's and 0's allows you to replicate a count (which is the normal use of a class variable) with a sum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Of course, the same was done with the mismatch_dummy variable, except you want a mean instead of a sum.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To make the code clearer, take away all the quoted elements, and maybe the formats - then you'll see the operational code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data work.summary_data;
  infile datalines dlm=',' dsd truncover;
  length PendingNo $9 CrUnit $5 Store $5 match $10 bucket $5 Rulechar $1 Rule 3 ;
  input PendingNo CrUnit Store match bucket Rulechar $ Rule 1.  ;
datalines;
253864481,4730,4,MATCH,0-5,2,2
212777089,4730,4,NOMATCH,0-5,,
301172842,4730,11,MATCH,0-5,4,4
281739414,4730,14,MATCH,6-15,1,1
261300392,4730,14,MATCH,0-5,4,4
288475892,4730,14,MATCH,0-5,4,4
313076925,4730,14,MATCH,0-5,4,4
23131926,4730,14,MATCH,0-5,4,4
273107812,4730,58,MATCH,0-5,3,3
226270010,4730,70,MATCH,0-5,1,1
276177164,4730,70,MATCH,0-5,1,1
92644582,4730,70,MATCH,0-5,1,1
137788903,4730,70,MATCH,0-5,1,1
63797089,4730,70,MATCH,0-5,1,1
114514092,4730,70,MATCH,6-15,1,1
159810023,4730,70,MATCH,0-5,1,1
239028597,4730,70,MATCH,6-15,1,1
291638142,4730,70,MATCH,0-5,1,1
306576926,4730,70,MATCH,0-5,2,2
184156646,4730,70,MATCH,0-5,3,3
214132768,4730,70,MATCH,0-5,3,3
51683419,4730,70,MATCH,0-5,3,3
137563134,4730,70,MATCH,0-5,3,3
217461698,4730,70,MATCH,0-5,3,3
109113011,4730,70,MATCH,0-5,3,3
149173652,4730,70,MATCH,0-5,3,3
154079135,4730,70,MATCH,0-5,3,3
189377914,4730,70,MATCH,0-5,3,3
204766847,4730,70,MATCH,0-5,3,3
189066497,4730,70,MATCH,0-5,4,4
251583641,4730,70,MATCH,0-5,4,4
306428966,4730,70,MATCH,0-5,4,4
46074769,4730,70,MATCH,0-5,4,4
72116021,4730,70,MATCH,0-5,4,4
112755683,4730,70,MATCH,0-5,4,4
112963673,4730,70,MATCH,0-5,4,4
147893714,4730,70,MATCH,0-5,4,4
162142576,4730,70,MATCH,0-5,4,4
233991350,4730,70,MATCH,0-5,4,4
283368603,4730,70,MATCH,0-5,4,4
38519097,4730,70,MATCH,0-5,4,4
78059359,4730,70,MATCH,0-5,4,4
104160371,4730,130,MATCH,0-5,4,4
119392631,4730,130,MATCH,0-5,4,4
184920636,4730,130,MATCH,0-5,4,4
81757207,4730,130,MATCH,0-5,4,4
96275766,4730,130,MATCH,0-5,4,4
96633756,4730,130,MATCH,0-5,4,4
214350928,4730,139,MATCH,0-5,1,1
13148566,4730,139,MATCH,0-5,3,3
164847505,4730,139,MATCH,0-5,4,4
184356706,4730,139,MATCH,0-5,4,4
67873620,4730,139,MATCH,0-5,4,4
72534031,4730,139,MATCH,0-5,4,4
102649143,4730,139,MATCH,0-5,4,4
182921667,4730,139,MATCH,0-5,4,4
207836158,4730,139,MATCH,0-5,4,4
238375000,4730,139,MATCH,0-5,4,4
278454232,4730,139,MATCH,0-5,4,4
298747613,4730,139,MATCH,0-5,4,4
251074531,4730,139,NOMATCH,0-5,,
293309254,4730,139,NOMATCH,0-5,,
204006727,4730,139,NOMATCH,0-5,,
106813447,4730,139,NOMATCH,0-5,,
43030128,4730,140,MATCH,6-15,1,1
291264232,4730,140,MATCH,0-5,1,1
296210900,4730,140,MATCH,0-5,2,2
99259380,4730,140,MATCH,16-30,3,3
51328329,4730,143,MATCH,16-30,1,1
run;


data need / view=need;
  set work.summary_data ;

  /*Put a leading space in front of '0-5' and '6-15' so that
    lexicographic order replicates the intended age group order*/
  if bucket='0-5' then bucket=' 0-5';
  else if bucket='6-15' then bucket=' 6-15';

  if rule=. then do;
    rule=99 ; /*Use for mismatch*/
    match_dummy=0;
  end;
  else match_dummy=1;

  mismatch_dummy=1-match_dummy;

  /*Right justify STORE variable to get expected sort order*/
  store=right(store); 
run ;


proc format ;
  value rulefmt   99='MisMatch'  other=[1.] ;
run;

proc tabulate data =need;
  class rule store bucket ;
  var match_dummy mismatch_dummy;
  table   store
        , rule*n=' '*f=comma6.0
          all='Total'*N=''*f=comma6.0
          match_dummy='% of Match by Aging Bucket'*bucket=' '*sum=' '*f=comma6.0
          mismatch_dummy='MisMatch %'*mean=' '*f=percent5.;
  format rule rulefmt. ;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Jul 2022 14:48:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/need-help-creating-a-summary/m-p/823855#M325340</guid>
      <dc:creator>mkeintz</dc:creator>
      <dc:date>2022-07-18T14:48:34Z</dc:date>
    </item>
  </channel>
</rss>

