<?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 get date for every thousand sales in SAS in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-date-for-every-thousand-sales-in-SAS/m-p/420725#M103530</link>
    <description>&lt;P&gt;I have data set with the date and no of sales for that particular date, I need create report to see how many days took for every thousand sales,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Date&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NoOfSales&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;01Jan17&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;200&lt;/P&gt;&lt;P&gt;02Jan17&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;350&lt;/P&gt;&lt;P&gt;03Jan17&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;350&lt;/P&gt;&lt;P&gt;04Jan17&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;200&lt;/P&gt;&lt;P&gt;05Jan17&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;100&lt;/P&gt;&lt;P&gt;06Jan17&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;400&lt;/P&gt;&lt;P&gt;07Jan17&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;300&lt;/P&gt;&lt;P&gt;08Jan17&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;200&lt;/P&gt;&lt;P&gt;09Jan17&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;200&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;and so on&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;from this table i need to create a table on what date it crossed 1000, 2000, 3000 sales and soon&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here&amp;nbsp;&lt;/P&gt;&lt;P&gt;04Jan17&amp;nbsp; &amp;nbsp; &amp;nbsp;1000&lt;/P&gt;&lt;P&gt;08Jan17&amp;nbsp; &amp;nbsp; &amp;nbsp;2000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please suggest he how we can achieve this in PROC SQL or DATA step ?&lt;/P&gt;</description>
    <pubDate>Wed, 13 Dec 2017 10:04:16 GMT</pubDate>
    <dc:creator>Gangi</dc:creator>
    <dc:date>2017-12-13T10:04:16Z</dc:date>
    <item>
      <title>How to get date for every thousand sales in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-date-for-every-thousand-sales-in-SAS/m-p/420725#M103530</link>
      <description>&lt;P&gt;I have data set with the date and no of sales for that particular date, I need create report to see how many days took for every thousand sales,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Date&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;NoOfSales&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;01Jan17&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;200&lt;/P&gt;&lt;P&gt;02Jan17&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;350&lt;/P&gt;&lt;P&gt;03Jan17&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;350&lt;/P&gt;&lt;P&gt;04Jan17&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;200&lt;/P&gt;&lt;P&gt;05Jan17&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;100&lt;/P&gt;&lt;P&gt;06Jan17&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;400&lt;/P&gt;&lt;P&gt;07Jan17&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;300&lt;/P&gt;&lt;P&gt;08Jan17&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;200&lt;/P&gt;&lt;P&gt;09Jan17&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;200&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;.&lt;/P&gt;&lt;P&gt;&amp;nbsp;and so on&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;from this table i need to create a table on what date it crossed 1000, 2000, 3000 sales and soon&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;here&amp;nbsp;&lt;/P&gt;&lt;P&gt;04Jan17&amp;nbsp; &amp;nbsp; &amp;nbsp;1000&lt;/P&gt;&lt;P&gt;08Jan17&amp;nbsp; &amp;nbsp; &amp;nbsp;2000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please suggest he how we can achieve this in PROC SQL or DATA step ?&lt;/P&gt;</description>
      <pubDate>Wed, 13 Dec 2017 10:04:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-date-for-every-thousand-sales-in-SAS/m-p/420725#M103530</guid>
      <dc:creator>Gangi</dc:creator>
      <dc:date>2017-12-13T10:04:16Z</dc:date>
    </item>
    <item>
      <title>Re: How to get date for every thousand sales in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-date-for-every-thousand-sales-in-SAS/m-p/420728#M103531</link>
      <description>&lt;P&gt;Post test data in the form of a datastep.&amp;nbsp; As such untested:&lt;/P&gt;
&lt;PRE&gt;data want;
  set have;
  retain tot group;
  if _n_=1 then do;
    tot=noofsales;
    group=1000;
  end;
  else tot=sum(tot,noofsales);
  if noofsales &amp;gt;= 1000 then do;
    output;
    group=sum(group,1000);
    noofsales=0;
  end;
run;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Dec 2017 10:11:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-date-for-every-thousand-sales-in-SAS/m-p/420728#M103531</guid>
      <dc:creator>RW9</dc:creator>
      <dc:date>2017-12-13T10:11:00Z</dc:date>
    </item>
    <item>
      <title>Re: How to get date for every thousand sales in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-date-for-every-thousand-sales-in-SAS/m-p/420731#M103533</link>
      <description>&lt;P&gt;I would use a data step:&lt;/P&gt;&lt;PRE&gt;data want;
  set have;
  cum_sales+NoOfSales;
  threshold=floor(cum_sales/1000)*1000;
  if threshold ne lag(threshold) and threshold&amp;gt;0;
run;&lt;/PRE&gt;</description>
      <pubDate>Wed, 13 Dec 2017 10:32:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-date-for-every-thousand-sales-in-SAS/m-p/420731#M103533</guid>
      <dc:creator>s_lassen</dc:creator>
      <dc:date>2017-12-13T10:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: How to get date for every thousand sales in SAS</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-get-date-for-every-thousand-sales-in-SAS/m-p/420752#M103542</link>
      <description>Perfectly worked...!!!&lt;BR /&gt;Thank you</description>
      <pubDate>Wed, 13 Dec 2017 11:46:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-get-date-for-every-thousand-sales-in-SAS/m-p/420752#M103542</guid>
      <dc:creator>Gangi</dc:creator>
      <dc:date>2017-12-13T11:46:41Z</dc:date>
    </item>
  </channel>
</rss>

