<?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 sql summary alternative in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/proc-sql-summary-alternative/m-p/46009#M9500</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm obviously under pressure from @Ksharp here....&lt;/P&gt;&lt;P&gt;However, @manojinpec is right in that how the criteria is defined will determine how best to proceed.&amp;nbsp; If it is based on values of a single variable then multilabel format is a possibility.&amp;nbsp; If it is based on multiple conditions then I would suggest a datastep that creates variables Type1 - Type10 and stores a running total of paid_amt in each, thereby requiring only 1 pass of the data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 28 Mar 2012 09:03:54 GMT</pubDate>
    <dc:creator>Keith</dc:creator>
    <dc:date>2012-03-28T09:03:54Z</dc:date>
    <item>
      <title>proc sql summary alternative</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-sql-summary-alternative/m-p/46006#M9497</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a proc sql steps to produce a summary data based on the same table like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc sql;&lt;/P&gt;&lt;P&gt;&amp;nbsp; create table combined as&lt;/P&gt;&lt;P&gt;&amp;nbsp; select 'type 1' as type, state, sum(paid_amt) as paid_amt&lt;/P&gt;&lt;P&gt;&amp;nbsp; from base&lt;/P&gt;&lt;P&gt;&amp;nbsp; where &lt;EM&gt;criteria1&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; &lt;/EM&gt;group by state&lt;/P&gt;&lt;P&gt;&amp;nbsp; union&lt;/P&gt;&lt;P&gt;&amp;nbsp; select 'type 2' as type, state, sum(paid_amt) as paid_amt&lt;/P&gt;&lt;P&gt;&amp;nbsp; from base&lt;/P&gt;&lt;P&gt;&amp;nbsp; where &lt;EM&gt;criteria2&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;EM&gt;&amp;nbsp; &lt;/EM&gt;&lt;/EM&gt;group by state&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&amp;nbsp; .....&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; select 'type 10' as type, state, sum(paid_amt) as paid_amt&lt;/P&gt;&lt;P&gt;&amp;nbsp; from base&lt;/P&gt;&lt;P&gt;&amp;nbsp; where &lt;EM&gt;criteria10&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt; &lt;/EM&gt;group by state&lt;/P&gt;&lt;P&gt;; run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;A record can belong to several types. base table needs to be run 10 times in this sql. I wonder if there is a trick to produce the summary data quicker.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Mar 2012 23:18:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-sql-summary-alternative/m-p/46006#M9497</guid>
      <dc:creator>aha123</dc:creator>
      <dc:date>2012-03-27T23:18:45Z</dc:date>
    </item>
    <item>
      <title>proc sql summary alternative</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-sql-summary-alternative/m-p/46007#M9498</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I remember Keith has done it by using Multi-label format before.&lt;/P&gt;&lt;P&gt;Maybe Keith will appear again and code it for you . &lt;img id="smileyhappy" class="emoticon emoticon-smileyhappy" src="https://communities.sas.com/i/smilies/16x16_smiley-happy.png" alt="Smiley Happy" title="Smiley Happy" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ksharp&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2012 06:48:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-sql-summary-alternative/m-p/46007#M9498</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2012-03-28T06:48:26Z</dc:date>
    </item>
    <item>
      <title>proc sql summary alternative</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-sql-summary-alternative/m-p/46008#M9499</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; what is criteria1 2 3...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2012 07:03:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-sql-summary-alternative/m-p/46008#M9499</guid>
      <dc:creator>manojinpec</dc:creator>
      <dc:date>2012-03-28T07:03:27Z</dc:date>
    </item>
    <item>
      <title>proc sql summary alternative</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-sql-summary-alternative/m-p/46009#M9500</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm obviously under pressure from @Ksharp here....&lt;/P&gt;&lt;P&gt;However, @manojinpec is right in that how the criteria is defined will determine how best to proceed.&amp;nbsp; If it is based on values of a single variable then multilabel format is a possibility.&amp;nbsp; If it is based on multiple conditions then I would suggest a datastep that creates variables Type1 - Type10 and stores a running total of paid_amt in each, thereby requiring only 1 pass of the data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2012 09:03:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-sql-summary-alternative/m-p/46009#M9500</guid>
      <dc:creator>Keith</dc:creator>
      <dc:date>2012-03-28T09:03:54Z</dc:date>
    </item>
    <item>
      <title>proc sql summary alternative</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-sql-summary-alternative/m-p/46010#M9501</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Keith!! Could you please send me an example on how to use multilabel format.I haev never used it.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2012 09:36:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-sql-summary-alternative/m-p/46010#M9501</guid>
      <dc:creator>manojinpec</dc:creator>
      <dc:date>2012-03-28T09:36:44Z</dc:date>
    </item>
    <item>
      <title>proc sql summary alternative</title>
      <link>https://communities.sas.com/t5/SAS-Programming/proc-sql-summary-alternative/m-p/46011#M9502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Essentially it's a method that allows overlapping formats that can then be used in certain SAS procedures (SUMMARY, MEANS, TABULATE, REPORT).&amp;nbsp; If you google 'SAS multilabel format' then there are plenty of papers that describe this in more detail and provide some good examples.&amp;nbsp; The main things to note are :&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;add the option 'multilabel' inside PROC FORMAT.&lt;/LI&gt;&lt;LI&gt;add the option 'mlf' against the specific class variable inside the summary procedure.&lt;/LI&gt;&lt;LI&gt;include the format statement inside the summary procedure.&lt;/LI&gt;&lt;/UL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Mar 2012 09:50:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/proc-sql-summary-alternative/m-p/46011#M9502</guid>
      <dc:creator>Keith</dc:creator>
      <dc:date>2012-03-28T09:50:42Z</dc:date>
    </item>
  </channel>
</rss>

