<?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: Sum a all the 1 in a variable according to the ID separated with different numbers in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Sum-all-the-1-in-a-variable-which-are-separated-with-different/m-p/722885#M224226</link>
    <description>Thank you&lt;BR /&gt;The code works successfully</description>
    <pubDate>Tue, 02 Mar 2021 15:48:03 GMT</pubDate>
    <dc:creator>tSAS1</dc:creator>
    <dc:date>2021-03-02T15:48:03Z</dc:date>
    <item>
      <title>Sum all the 1 in a variable which are separated with different numbers by ID</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sum-all-the-1-in-a-variable-which-are-separated-with-different/m-p/722862#M224209</link>
      <description>Hello everyone,&lt;BR /&gt;&amp;amp;nbsp;&lt;BR /&gt;I have a database like that :&lt;BR /&gt;ID&lt;BR /&gt;flag&lt;BR /&gt;A&lt;BR /&gt;1&lt;BR /&gt;A&lt;BR /&gt;1&lt;BR /&gt;A&lt;BR /&gt;1&lt;BR /&gt;A&lt;BR /&gt;1&lt;BR /&gt;A&lt;BR /&gt;21&lt;BR /&gt;A&lt;BR /&gt;1&lt;BR /&gt;A&lt;BR /&gt;1&lt;BR /&gt;B&lt;BR /&gt;1&lt;BR /&gt;B&lt;BR /&gt;1&lt;BR /&gt;B&lt;BR /&gt;7&lt;BR /&gt;B&lt;BR /&gt;1&lt;BR /&gt;B&lt;BR /&gt;1&lt;BR /&gt;B&lt;BR /&gt;1&lt;BR /&gt;B&lt;BR /&gt;30&lt;BR /&gt;B&lt;BR /&gt;1&lt;BR /&gt;B&lt;BR /&gt;1&lt;BR /&gt;B&lt;BR /&gt;1&lt;BR /&gt;B&lt;BR /&gt;1&lt;BR /&gt;B&lt;BR /&gt;1&lt;BR /&gt;&amp;amp;nbsp;&lt;BR /&gt;&amp;amp;nbsp;and I want to sum all the 1 values of flag variable separated with different numbers it to this form:&lt;BR /&gt;&amp;amp;nbsp;</description>
      <pubDate>Tue, 02 Mar 2021 19:03:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sum-all-the-1-in-a-variable-which-are-separated-with-different/m-p/722862#M224209</guid>
      <dc:creator>tSAS1</dc:creator>
      <dc:date>2021-03-02T19:03:59Z</dc:date>
    </item>
    <item>
      <title>Re: Sum a all the 1 in a variable according to the ID separated with different numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sum-all-the-1-in-a-variable-which-are-separated-with-different/m-p/722864#M224211</link>
      <description>&lt;P&gt;Your data is a picture. Make it TEXT.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test;
   input id y;
   cards;
1 1
1 1
1 2
1 1
1 1
1 1
1 3
1 1
2 1
2 2
2 1
2 1
2 1
2 3
2 1
;;;;
proc summary data=test nway missing;
   by id y notsorted;
   output out=test2(where=(y eq 1)) sum(y)=sumY;
   run;
proc print;
   run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture.PNG" style="width: 225px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/55352i121E51782DDACDBD/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture.PNG" alt="Capture.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 02 Mar 2021 14:41:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sum-all-the-1-in-a-variable-which-are-separated-with-different/m-p/722864#M224211</guid>
      <dc:creator>data_null__</dc:creator>
      <dc:date>2021-03-02T14:41:52Z</dc:date>
    </item>
    <item>
      <title>Re: Sum a all the 1 in a variable according to the ID separated with different numbers</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Sum-all-the-1-in-a-variable-which-are-separated-with-different/m-p/722885#M224226</link>
      <description>Thank you&lt;BR /&gt;The code works successfully</description>
      <pubDate>Tue, 02 Mar 2021 15:48:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Sum-all-the-1-in-a-variable-which-are-separated-with-different/m-p/722885#M224226</guid>
      <dc:creator>tSAS1</dc:creator>
      <dc:date>2021-03-02T15:48:03Z</dc:date>
    </item>
  </channel>
</rss>

