<?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: Summary in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Summary/m-p/211245#M39127</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;well.. it deosnt have to start in Jan or feb&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 07 May 2015 15:17:59 GMT</pubDate>
    <dc:creator>SASPhile</dc:creator>
    <dc:date>2015-05-07T15:17:59Z</dc:date>
    <item>
      <title>Summary</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summary/m-p/211242#M39124</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;data test;&lt;BR /&gt;input id jan feb mar apr;&lt;BR /&gt;cards;&lt;BR /&gt;1 732 750 748 790&lt;BR /&gt;2 760&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp; 0&lt;BR /&gt;3 750&amp;nbsp;&amp;nbsp; 0&amp;nbsp; 765&amp;nbsp; 0&lt;BR /&gt;4 666&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp; 0&lt;BR /&gt;5 777 779&amp;nbsp; 880&amp;nbsp; 0 &lt;BR /&gt;6 850&amp;nbsp;&amp;nbsp; 0&amp;nbsp; 779&amp;nbsp; 0&lt;BR /&gt;;&lt;BR /&gt;run; &lt;/P&gt;&lt;P&gt;How to get a summary&amp;nbsp; that tells how many id's have scores present in&lt;/P&gt;&lt;P&gt;All months (id 1)&lt;BR /&gt;only first month (id 2 and 4)&lt;BR /&gt;two months (id 3 and 6)&lt;BR /&gt;consecutive months (id 1 and 5)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 May 2015 15:00:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summary/m-p/211242#M39124</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2015-05-07T15:00:12Z</dc:date>
    </item>
    <item>
      <title>Re: Summary</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summary/m-p/211243#M39125</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If existence is important then this may be one of those times where you do not want 0 but missing values as NMISS would simplify the logic.&lt;/P&gt;&lt;P&gt;Is your "two months" required to start with Jan or any two months, and does it have to be EXACTLY two months?&lt;/P&gt;&lt;P&gt;Is your consecutive required to start with Jan? Does it count for consecutive if there are only two months?&lt;/P&gt;&lt;P&gt;Are these consecutive or two months?&lt;/P&gt;&lt;P&gt;7 850&amp;nbsp;&amp;nbsp;&amp;nbsp; 779&amp;nbsp;&amp;nbsp; 0 0&lt;/P&gt;&lt;P&gt;8 0&amp;nbsp; 850&amp;nbsp;&amp;nbsp; 779&amp;nbsp; 0&lt;/P&gt;&lt;P&gt;9 0&amp;nbsp;&amp;nbsp; 850&amp;nbsp;&amp;nbsp; 779&amp;nbsp; 110&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 May 2015 15:11:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summary/m-p/211243#M39125</guid>
      <dc:creator>ballardw</dc:creator>
      <dc:date>2015-05-07T15:11:34Z</dc:date>
    </item>
    <item>
      <title>Re: Summary</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summary/m-p/211244#M39126</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;IMO having dates of any type as columns is a bad idea.&amp;nbsp; First thing I would do with this data is normalise it:&lt;/P&gt;&lt;P&gt;ID&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; MONTH&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; RESULT&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Jan&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 1234&lt;/P&gt;&lt;P&gt;1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Feb&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 234&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its simple then to do sums and such like across the data using SQL or means procedure.&amp;nbsp; If you absolutely have to have them as columns, then name the columns a standard with suffix approach and put other data in the label:&lt;/P&gt;&lt;P&gt;COL1&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; COL2&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ...&lt;/P&gt;&lt;P&gt;"Jan"&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "Feb"&lt;/P&gt;&lt;P&gt;As then you can use array processing on them.&amp;nbsp; However, with 'data' as columns you may find you have thousands of columns if you have several years data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 May 2015 15:17:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summary/m-p/211244#M39126</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2015-05-07T15:17:14Z</dc:date>
    </item>
    <item>
      <title>Re: Summary</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summary/m-p/211245#M39127</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;well.. it deosnt have to start in Jan or feb&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 May 2015 15:17:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summary/m-p/211245#M39127</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2015-05-07T15:17:59Z</dc:date>
    </item>
    <item>
      <title>Re: Summary</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summary/m-p/211246#M39128</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It appears that "0" is not a valid score.&amp;nbsp; So the first step is to change all the "0" values to missings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then you can do the first and third with the N function, as&lt;/P&gt;&lt;P&gt;all=(N(of jan--apr)=4);&lt;/P&gt;&lt;P&gt;two=(N(of jan--apr)=2);&lt;/P&gt;&lt;P&gt;The second follows as&lt;/P&gt;&lt;P&gt;first=((jan&amp;gt;.) &amp;amp; (N(of jan-apr)=1)));&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The last one will require some if-the-else logic or a Perl expression.&amp;nbsp; My Perl is too rusty to provide useful thoughts.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 May 2015 15:20:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summary/m-p/211246#M39128</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2015-05-07T15:20:57Z</dc:date>
    </item>
    <item>
      <title>Re: Summary</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summary/m-p/211247#M39129</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can the values be defined under one variable?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 May 2015 16:20:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summary/m-p/211247#M39129</guid>
      <dc:creator>SASPhile</dc:creator>
      <dc:date>2015-05-07T16:20:47Z</dc:date>
    </item>
    <item>
      <title>Re: Summary</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summary/m-p/211248#M39130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Post an example of how you'd want that to look please&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 May 2015 16:52:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summary/m-p/211248#M39130</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2015-05-07T16:52:59Z</dc:date>
    </item>
    <item>
      <title>Re: Summary</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summary/m-p/211249#M39131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;data test;&lt;/P&gt;&lt;P&gt;input id jan feb mar apr;&lt;/P&gt;&lt;P&gt;array month Jan--Apr;&lt;/P&gt;&lt;P&gt;length flag $15.;&lt;/P&gt;&lt;P&gt;if nmiss(of month(*))=0 then flag='All';&lt;/P&gt;&lt;P&gt;else if nmiss(of month(*))=3 then flag='First';&lt;/P&gt;&lt;P&gt;else if nmiss(of month(*))=1 then do;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; if whichc(.,of month(*)) in (1,4) then flag='Consecutive';&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; else flag='Two Months'; &lt;/P&gt;&lt;P&gt;end;&lt;/P&gt;&lt;P&gt;else if nmiss(of month(*))=2 then flag='Two Months';&lt;/P&gt;&lt;P&gt;cards;&lt;/P&gt;&lt;P&gt;1 732 750 748 790&lt;/P&gt;&lt;P&gt;2 760&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp; .&lt;/P&gt;&lt;P&gt;3 750&amp;nbsp;&amp;nbsp; .&amp;nbsp; 765&amp;nbsp; .&lt;/P&gt;&lt;P&gt;4 666&amp;nbsp;&amp;nbsp; .&amp;nbsp;&amp;nbsp;&amp;nbsp; .&amp;nbsp; .&lt;/P&gt;&lt;P&gt;5 777 779&amp;nbsp; 880&amp;nbsp; .&lt;/P&gt;&lt;P&gt;6 850&amp;nbsp;&amp;nbsp; .&amp;nbsp; 779&amp;nbsp; .&lt;/P&gt;&lt;P&gt;;&lt;/P&gt;&lt;P&gt;run; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 07 May 2015 17:20:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summary/m-p/211249#M39131</guid>
      <dc:creator>slchen</dc:creator>
      <dc:date>2015-05-07T17:20:11Z</dc:date>
    </item>
    <item>
      <title>Re: Summary</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Summary/m-p/211250#M39132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;data test;&lt;BR /&gt;input id jan feb mar apr;&lt;BR /&gt;cards;&lt;BR /&gt;1 732 750 748 790&lt;BR /&gt;2 760&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp; 0&lt;BR /&gt;3 750&amp;nbsp;&amp;nbsp; 0&amp;nbsp; 765&amp;nbsp; 0&lt;BR /&gt;4 666&amp;nbsp;&amp;nbsp; 0&amp;nbsp;&amp;nbsp;&amp;nbsp; 0&amp;nbsp; 0&lt;BR /&gt;5 777 779&amp;nbsp; 880&amp;nbsp; 0 &lt;BR /&gt;6 850&amp;nbsp;&amp;nbsp; 0&amp;nbsp; 779&amp;nbsp; 0&lt;BR /&gt;;&lt;BR /&gt;run; &lt;/P&gt;&lt;P&gt;proc transposrt data=test out=new;&lt;BR /&gt;by id;&lt;BR /&gt;run;&lt;BR /&gt;proc print data=new;&lt;BR /&gt;run;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;proc sql;&lt;BR /&gt;select count(*) from new &lt;BR /&gt;where col1&amp;gt;0&lt;BR /&gt;group by id;&lt;BR /&gt;quit;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 May 2015 08:44:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Summary/m-p/211250#M39132</guid>
      <dc:creator>bharathtuppad</dc:creator>
      <dc:date>2015-05-08T08:44:05Z</dc:date>
    </item>
  </channel>
</rss>

