<?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 Calculating the number of customers per year based on their date of entry into Accountstatus. in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/Calculating-the-number-of-customers-per-year-based-on-their-date/m-p/861373#M38068</link>
    <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;Task requirement: From the dataset find the number of account entered in Accountstatus each year. I am using the code but it is giving only the year information and not the count in each year. Can you please let me know what I am missing in my code? Please see the below sample data.&lt;/P&gt;
&lt;P&gt;data test; &lt;BR /&gt;input AccountKey AccountStatusKey_Current DateKey Date AccountNumber AccountStatus PreviousAccountStatus icustomerid CountAccountNumber; &lt;BR /&gt;56278 51 20110916 16-Sep-11 10024033 904 904 101774 1 &lt;BR /&gt;13206 51 20110916 16-Sep-11 10005476 904 904 21397622 1 &lt;BR /&gt;1028977 51 20110921 21-Sep-11 10508239 904 904 480014 1 &lt;BR /&gt;873791 51 20110921 21-Sep-11 10430779 904 904 16341029 1 &lt;BR /&gt;448436 51 20110921 21-Sep-11 10215876 904 904 21945513 1 &lt;BR /&gt;155719 51 20110921 21-Sep-11 10069566 904 904 19463551 1 &lt;BR /&gt;; &lt;BR /&gt;run;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Proc sql;
create table Entered_in_133 as
select distinct year(date) as year
from Multiple_acc_number;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 28 Feb 2023 13:56:08 GMT</pubDate>
    <dc:creator>Sandeep77</dc:creator>
    <dc:date>2023-02-28T13:56:08Z</dc:date>
    <item>
      <title>Calculating the number of customers per year based on their date of entry into Accountstatus.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Calculating-the-number-of-customers-per-year-based-on-their-date/m-p/861373#M38068</link>
      <description>&lt;P&gt;Hi all,&lt;/P&gt;
&lt;P&gt;Task requirement: From the dataset find the number of account entered in Accountstatus each year. I am using the code but it is giving only the year information and not the count in each year. Can you please let me know what I am missing in my code? Please see the below sample data.&lt;/P&gt;
&lt;P&gt;data test; &lt;BR /&gt;input AccountKey AccountStatusKey_Current DateKey Date AccountNumber AccountStatus PreviousAccountStatus icustomerid CountAccountNumber; &lt;BR /&gt;56278 51 20110916 16-Sep-11 10024033 904 904 101774 1 &lt;BR /&gt;13206 51 20110916 16-Sep-11 10005476 904 904 21397622 1 &lt;BR /&gt;1028977 51 20110921 21-Sep-11 10508239 904 904 480014 1 &lt;BR /&gt;873791 51 20110921 21-Sep-11 10430779 904 904 16341029 1 &lt;BR /&gt;448436 51 20110921 21-Sep-11 10215876 904 904 21945513 1 &lt;BR /&gt;155719 51 20110921 21-Sep-11 10069566 904 904 19463551 1 &lt;BR /&gt;; &lt;BR /&gt;run;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Proc sql;
create table Entered_in_133 as
select distinct year(date) as year
from Multiple_acc_number;
quit;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 28 Feb 2023 13:56:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Calculating-the-number-of-customers-per-year-based-on-their-date/m-p/861373#M38068</guid>
      <dc:creator>Sandeep77</dc:creator>
      <dc:date>2023-02-28T13:56:08Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating the number of customers per year based on their date of entry into Accountstatus.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Calculating-the-number-of-customers-per-year-based-on-their-date/m-p/861378#M38070</link>
      <description>&lt;P&gt;You have provided us code that doesn't work. Could you please fix it?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Next, your question isn't&amp;nbsp; clear. You want the count in each year, ok, count of what? Count of records? You haven't asked SQL to produce counts, you just have asked it to provide the distinct YEAR values in the data set. So I'm confused.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you want count of records, use PROC FREQ&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc freq data=have;
    tables date;
    format date year.;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 28 Feb 2023 14:04:29 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Calculating-the-number-of-customers-per-year-based-on-their-date/m-p/861378#M38070</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-02-28T14:04:29Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating the number of customers per year based on their date of entry into Accountstatus.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Calculating-the-number-of-customers-per-year-based-on-their-date/m-p/861380#M38071</link>
      <description>&lt;P&gt;Sorry for that. Yes, I want to count the number of records in each year.&lt;/P&gt;
&lt;P&gt;data test;&lt;BR /&gt;input AccountKey AccountStatusKey_Current DateKey Date AccountNumber AccountStatus PreviousAccountStatus icustomerid CountAccountNumber;&lt;BR /&gt;datalines;&lt;/P&gt;
&lt;P&gt;56278 51 20110916 16SEP2011 10024033 904 904 101774 1&lt;BR /&gt;13206 51 20110916 16SEP2011 10005476 904 904 21397622 1&lt;BR /&gt;1028977 51 20110921 21SEP2011 10508239 904 904 480014 1&lt;BR /&gt;873791 51 20110921 21SEP2011 10430779 904 904 16341029 1&lt;BR /&gt;448436 51 20110921 21SEP2011 10215876 904 904 21945513 1&lt;BR /&gt;;&lt;BR /&gt;run;&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 14:09:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Calculating-the-number-of-customers-per-year-based-on-their-date/m-p/861380#M38071</guid>
      <dc:creator>Sandeep77</dc:creator>
      <dc:date>2023-02-28T14:09:14Z</dc:date>
    </item>
    <item>
      <title>Re: Calculating the number of customers per year based on their date of entry into Accountstatus.</title>
      <link>https://communities.sas.com/t5/New-SAS-User/Calculating-the-number-of-customers-per-year-based-on-their-date/m-p/861392#M38072</link>
      <description>&lt;P&gt;Your code still does not read the dates properly.&lt;/P&gt;</description>
      <pubDate>Tue, 28 Feb 2023 14:26:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/Calculating-the-number-of-customers-per-year-based-on-their-date/m-p/861392#M38072</guid>
      <dc:creator>PaigeMiller</dc:creator>
      <dc:date>2023-02-28T14:26:36Z</dc:date>
    </item>
  </channel>
</rss>

