<?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 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-summary-table-of-counts/m-p/531370#M145418</link>
    <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data t1;
input cinfno carte$;
datalines;
1 caba
1 cb
2 cb
3 caba
4 cb
4 caba
5 caba
;
run;    
/*no of customers having both*/
data w1;
set t1 end=lr;
by cinfno;
if not(first.cinfno and last.cinfno) then f=1;
if last.cinfno and f then no_of_customers_both+1;
if lr;
keep no_of_customers_both;
run;

proc sort data =t1 out=t;
by carte;
run;
data w2;
set t end=lr;
by carte;
if first.carte then numberofcustomers=1;
else  numberofcustomers+1;
if last.carte;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Wed, 30 Jan 2019 14:27:54 GMT</pubDate>
    <dc:creator>novinosrin</dc:creator>
    <dc:date>2019-01-30T14:27:54Z</dc:date>
    <item>
      <title>How to create a summary table of counts</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-summary-table-of-counts/m-p/531369#M145417</link>
      <description>&lt;P&gt;data t1;&lt;BR /&gt;input cinfno carte$;&lt;BR /&gt;datalines;&lt;BR /&gt;1 caba&lt;BR /&gt;1 cb&lt;BR /&gt;2 cb&lt;BR /&gt;3 caba&lt;BR /&gt;4 cb&lt;BR /&gt;4 caba&lt;/P&gt;
&lt;P&gt;5 caba&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using data steps write a code to display the number of customers having&amp;nbsp;&lt;/P&gt;
&lt;P&gt;carte: CB&lt;/P&gt;
&lt;P&gt;Carte: caba&lt;/P&gt;
&lt;P&gt;carte : both&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jan 2019 02:37:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-summary-table-of-counts/m-p/531369#M145417</guid>
      <dc:creator>Guptashwe</dc:creator>
      <dc:date>2019-01-31T02:37:28Z</dc:date>
    </item>
    <item>
      <title>Re: Need help</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-summary-table-of-counts/m-p/531370#M145418</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data t1;
input cinfno carte$;
datalines;
1 caba
1 cb
2 cb
3 caba
4 cb
4 caba
5 caba
;
run;    
/*no of customers having both*/
data w1;
set t1 end=lr;
by cinfno;
if not(first.cinfno and last.cinfno) then f=1;
if last.cinfno and f then no_of_customers_both+1;
if lr;
keep no_of_customers_both;
run;

proc sort data =t1 out=t;
by carte;
run;
data w2;
set t end=lr;
by carte;
if first.carte then numberofcustomers=1;
else  numberofcustomers+1;
if last.carte;
run;
&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 30 Jan 2019 14:27:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-summary-table-of-counts/m-p/531370#M145418</guid>
      <dc:creator>novinosrin</dc:creator>
      <dc:date>2019-01-30T14:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to create a summary table of counts</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-summary-table-of-counts/m-p/531523#M145480</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/249630"&gt;@Guptashwe&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that I've updated the subject line of your question to be more descriptive. Please use a more descriptive subject line in the future. This is to allow other future users to search for a topic and find the relevant answers more easily.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/249630"&gt;@Guptashwe&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;data t1;&lt;BR /&gt;input cinfno carte$;&lt;BR /&gt;datalines;&lt;BR /&gt;1 caba&lt;BR /&gt;1 cb&lt;BR /&gt;2 cb&lt;BR /&gt;3 caba&lt;BR /&gt;4 cb&lt;BR /&gt;4 caba&lt;/P&gt;
&lt;P&gt;5 caba&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Using data steps write a code to display the number of customers having&amp;nbsp;&lt;/P&gt;
&lt;P&gt;carte: CB&lt;/P&gt;
&lt;P&gt;Carte: caba&lt;/P&gt;
&lt;P&gt;carte : both&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 31 Jan 2019 02:38:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-create-a-summary-table-of-counts/m-p/531523#M145480</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2019-01-31T02:38:50Z</dc:date>
    </item>
  </channel>
</rss>

