<?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 How to count point below certain threshold. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-count-point-below-certain-threshold/m-p/479863#M123922</link>
    <description>&lt;P&gt;I appreciate your help.&lt;/P&gt;&lt;P&gt;I have data set shown below.&lt;/P&gt;&lt;P&gt;ID time NIBP&lt;/P&gt;&lt;P&gt;1 1 89&lt;/P&gt;&lt;P&gt;1 2 90&lt;/P&gt;&lt;P&gt;1 3 78&lt;/P&gt;&lt;P&gt;1 4 87&lt;/P&gt;&lt;P&gt;1 5 88&lt;/P&gt;&lt;P&gt;1 6 89&lt;/P&gt;&lt;P&gt;1 7 90&lt;/P&gt;&lt;P&gt;2 1 77&lt;/P&gt;&lt;P&gt;2 2 88&lt;/P&gt;&lt;P&gt;2 3 90&lt;/P&gt;&lt;P&gt;3 1 99&lt;/P&gt;&lt;P&gt;3 2 100&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to count point&amp;nbsp; where NIBP=&amp;lt;88 for individual ID. I would like to acquire an output like,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ID count&lt;/P&gt;&lt;P&gt;1 3&lt;/P&gt;&lt;P&gt;2 1&lt;/P&gt;&lt;P&gt;3 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my actual data set, the number of ID is 18 thousands and the length of the time is different for each ID.&amp;nbsp;&lt;BR /&gt;Thank you very much for your kindness in advance.&lt;/P&gt;</description>
    <pubDate>Fri, 20 Jul 2018 13:28:10 GMT</pubDate>
    <dc:creator>ykoba</dc:creator>
    <dc:date>2018-07-20T13:28:10Z</dc:date>
    <item>
      <title>How to count point below certain threshold.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-count-point-below-certain-threshold/m-p/479863#M123922</link>
      <description>&lt;P&gt;I appreciate your help.&lt;/P&gt;&lt;P&gt;I have data set shown below.&lt;/P&gt;&lt;P&gt;ID time NIBP&lt;/P&gt;&lt;P&gt;1 1 89&lt;/P&gt;&lt;P&gt;1 2 90&lt;/P&gt;&lt;P&gt;1 3 78&lt;/P&gt;&lt;P&gt;1 4 87&lt;/P&gt;&lt;P&gt;1 5 88&lt;/P&gt;&lt;P&gt;1 6 89&lt;/P&gt;&lt;P&gt;1 7 90&lt;/P&gt;&lt;P&gt;2 1 77&lt;/P&gt;&lt;P&gt;2 2 88&lt;/P&gt;&lt;P&gt;2 3 90&lt;/P&gt;&lt;P&gt;3 1 99&lt;/P&gt;&lt;P&gt;3 2 100&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would like to count point&amp;nbsp; where NIBP=&amp;lt;88 for individual ID. I would like to acquire an output like,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ID count&lt;/P&gt;&lt;P&gt;1 3&lt;/P&gt;&lt;P&gt;2 1&lt;/P&gt;&lt;P&gt;3 0&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In my actual data set, the number of ID is 18 thousands and the length of the time is different for each ID.&amp;nbsp;&lt;BR /&gt;Thank you very much for your kindness in advance.&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jul 2018 13:28:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-count-point-below-certain-threshold/m-p/479863#M123922</guid>
      <dc:creator>ykoba</dc:creator>
      <dc:date>2018-07-20T13:28:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to count point below certain threshold.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-count-point-below-certain-threshold/m-p/479865#M123923</link>
      <description>&lt;P&gt;UNTESTED CODE&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have2;
&amp;nbsp; &amp;nbsp; &amp;nbsp;set have;
&amp;nbsp; &amp;nbsp; &amp;nbsp;if nibp&amp;lt;=88 then flag=1;
&amp;nbsp; &amp;nbsp; &amp;nbsp;else flag=0;
run;

proc summary nway data=have2;
&amp;nbsp; &amp;nbsp; class id;
&amp;nbsp; &amp;nbsp; var flag;
&amp;nbsp; &amp;nbsp; output out=want sum=count;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jul 2018 13:33:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-count-point-below-certain-threshold/m-p/479865#M123923</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2018-07-20T13:33:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to count point below certain threshold.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-count-point-below-certain-threshold/m-p/479867#M123925</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data have;
input ID time NIBP;
cards;
1 1 89
1 2 90
1 3 78
1 4 87
1 5 88
1 6 89
1 7 90
2 1 77
2 2 88
2 3 90
3 1 99
3 2 100
;

proc sql;
create table want as
select id, sum(NIBP le 88) as count
from have
group by id;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Fri, 20 Jul 2018 13:55:09 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-count-point-below-certain-threshold/m-p/479867#M123925</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-07-20T13:55:09Z</dc:date>
    </item>
    <item>
      <title>Re: How to count point below certain threshold.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-count-point-below-certain-threshold/m-p/479874#M123928</link>
      <description>&lt;P&gt;Dear novinosrin,&lt;/P&gt;&lt;P&gt;I really appreciate for your prompt replay.&lt;/P&gt;&lt;P&gt;The code you told me perfectly worked!&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jul 2018 14:07:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-count-point-below-certain-threshold/m-p/479874#M123928</guid>
      <dc:creator>ykoba</dc:creator>
      <dc:date>2018-07-20T14:07:50Z</dc:date>
    </item>
    <item>
      <title>Re: How to count point below certain threshold.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-count-point-below-certain-threshold/m-p/479877#M123929</link>
      <description>&lt;P&gt;Dear PaigeMiller,&lt;/P&gt;&lt;P&gt;I appreciate for your immediate reply.&lt;/P&gt;&lt;P&gt;I will try later the code you told me.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jul 2018 14:10:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-count-point-below-certain-threshold/m-p/479877#M123929</guid>
      <dc:creator>ykoba</dc:creator>
      <dc:date>2018-07-20T14:10:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to count point below certain threshold.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-count-point-below-certain-threshold/m-p/479883#M123932</link>
      <description>&lt;P&gt;Thank you&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/149491"&gt;@ykoba&lt;/a&gt;&amp;nbsp; If you choose&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/10892"&gt;@PaigeMiller&lt;/a&gt;&amp;nbsp;'s solution, then mark his solution as accepted or if you choose mine, mark mine as accepted and close the thread please&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jul 2018 14:15:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-count-point-below-certain-threshold/m-p/479883#M123932</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2018-07-20T14:15:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to count point below certain threshold.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-count-point-below-certain-threshold/m-p/479888#M123934</link>
      <description>&lt;P&gt;Dear novinosrin,&lt;/P&gt;&lt;P&gt;I really appreciate your kindness!&lt;/P&gt;</description>
      <pubDate>Fri, 20 Jul 2018 14:28:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-count-point-below-certain-threshold/m-p/479888#M123934</guid>
      <dc:creator>ykoba</dc:creator>
      <dc:date>2018-07-20T14:28:15Z</dc:date>
    </item>
  </channel>
</rss>

