<?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: Counting Number of character Observation and print It in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Counting-Number-of-character-Observation-and-print-It/m-p/741720#M231893</link>
    <description>it did not work sorry .</description>
    <pubDate>Sun, 16 May 2021 12:22:50 GMT</pubDate>
    <dc:creator>shivam38</dc:creator>
    <dc:date>2021-05-16T12:22:50Z</dc:date>
    <item>
      <title>Counting Number of character Observation and print It</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Counting-Number-of-character-Observation-and-print-It/m-p/741709#M231884</link>
      <description>&lt;P&gt;Hey I am working on a dataset in which I just want to print the total number of observation from a particular column how I can achieve this in proc report.&lt;/P&gt;&lt;P&gt;like I have mentioning a sample code here.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;proc report data = shop;&lt;/P&gt;&lt;P&gt;column name type products price;&lt;/P&gt;&lt;P&gt;by type;&lt;/P&gt;&lt;P&gt;define products/group;&lt;/P&gt;&lt;P&gt;break after products/page;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this above example I just want to print the total number of products in each table, how can I do this help me /&lt;/P&gt;&lt;P&gt;Thank You in advance.&lt;/P&gt;</description>
      <pubDate>Sun, 16 May 2021 10:13:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Counting-Number-of-character-Observation-and-print-It/m-p/741709#M231884</guid>
      <dc:creator>shivam38</dc:creator>
      <dc:date>2021-05-16T10:13:43Z</dc:date>
    </item>
    <item>
      <title>Re: Counting Number of character Observation and print It</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Counting-Number-of-character-Observation-and-print-It/m-p/741712#M231886</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql;
select count(distinct products)
from shop;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 16 May 2021 10:59:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Counting-Number-of-character-Observation-and-print-It/m-p/741712#M231886</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-05-16T10:59:41Z</dc:date>
    </item>
    <item>
      <title>Re: Counting Number of character Observation and print It</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Counting-Number-of-character-Observation-and-print-It/m-p/741713#M231887</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/380467"&gt;@shivam38&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;
&lt;P&gt;Hey I am working on a dataset in which I just want to print the total number of observation from a particular column how I can achieve this in proc report.&lt;/P&gt;
&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;Do you mean the number of &lt;FONT color="#FF0000"&gt;DISTINCT&lt;/FONT&gt; levels of a variable?&lt;/P&gt;</description>
      <pubDate>Sun, 16 May 2021 11:00:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Counting-Number-of-character-Observation-and-print-It/m-p/741713#M231887</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-05-16T11:00:00Z</dc:date>
    </item>
    <item>
      <title>Re: Counting Number of character Observation and print It</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Counting-Number-of-character-Observation-and-print-It/m-p/741715#M231889</link>
      <description>&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sort data=sashelp.class out=have;
by sex;
run;
proc report data=have nowd;
by sex;
column name age weight n;
define age/display;
define weight/display;
rbreak after/summarize;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Sun, 16 May 2021 11:11:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Counting-Number-of-character-Observation-and-print-It/m-p/741715#M231889</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2021-05-16T11:11:36Z</dc:date>
    </item>
    <item>
      <title>Re: Counting Number of character Observation and print It</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Counting-Number-of-character-Observation-and-print-It/m-p/741720#M231893</link>
      <description>it did not work sorry .</description>
      <pubDate>Sun, 16 May 2021 12:22:50 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Counting-Number-of-character-Observation-and-print-It/m-p/741720#M231893</guid>
      <dc:creator>shivam38</dc:creator>
      <dc:date>2021-05-16T12:22:50Z</dc:date>
    </item>
    <item>
      <title>Re: Counting Number of character Observation and print It</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Counting-Number-of-character-Observation-and-print-It/m-p/741721#M231894</link>
      <description>I just want to do it in proc report method is it possible or not</description>
      <pubDate>Sun, 16 May 2021 12:23:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Counting-Number-of-character-Observation-and-print-It/m-p/741721#M231894</guid>
      <dc:creator>shivam38</dc:creator>
      <dc:date>2021-05-16T12:23:42Z</dc:date>
    </item>
    <item>
      <title>Re: Counting Number of character Observation and print It</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Counting-Number-of-character-Observation-and-print-It/m-p/741730#M231903</link>
      <description>&lt;BLOCKQUOTE&gt;&lt;HR /&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/380467"&gt;@shivam38&lt;/a&gt;&amp;nbsp;wrote:&lt;BR /&gt;it did not work sorry .&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;
&lt;P&gt;If that's all you tell us, we can't help further. You have not given us information that will help us figure out what the problem is.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When something doesn't work, SHOW US THE LOG for this PROC or DATA step! We want to see the entire LOG for this PROC or DATA step, that's 100%, all of it, without you selecting certain portions to show us.&lt;/P&gt;</description>
      <pubDate>Sun, 16 May 2021 13:18:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Counting-Number-of-character-Observation-and-print-It/m-p/741730#M231903</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2021-05-16T13:18:33Z</dc:date>
    </item>
    <item>
      <title>Re: Counting Number of character Observation and print It</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Counting-Number-of-character-Observation-and-print-It/m-p/741739#M231910</link>
      <description>&lt;P&gt;See this example, gleaned from &lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13549"&gt;@Cynthia_sas&lt;/a&gt;'s answer in &lt;A href="https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Report-how-to-get-distinct-count-of-a-variable/m-p/53210/highlight/true#M6648" target="_blank" rel="noopener"&gt;https://communities.sas.com/t5/ODS-and-Base-Reporting/Proc-Report-how-to-get-distinct-count-of-a-variable/m-p/53210/highlight/true#M6648&lt;/A&gt;&amp;nbsp;:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data bankinfo;
infile datalines;
input acct amt;
return;
datalines;
123 100
123 150
123 300
456 200
456 200
890 100
890 100
890 100
890 50
991 100
991 250
;

proc report data=bankinfo nowd;
column acct;
define acct / group noprint;
rbreak after / summarize;
compute acct;
if _break_ = ' ' then cnt_uniq + 1;
endcomp;
compute after /
style={just=l};
line 'Number of Accounts:' cnt_uniq 2.0;
endcomp;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;Result:&lt;/P&gt;
&lt;PRE&gt;Number of Accounts: 4
&lt;/PRE&gt;
&lt;P&gt;(Second hit of a Google search for "sas count distinct levels in proc report", see Maxim 6)&lt;/P&gt;</description>
      <pubDate>Sun, 16 May 2021 14:09:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Counting-Number-of-character-Observation-and-print-It/m-p/741739#M231910</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-05-16T14:09:59Z</dc:date>
    </item>
  </channel>
</rss>

