<?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: INTNX producing unexpected results in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/INTNX-producing-unexpected-results/m-p/88737#M18885</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're right! I just ran a proc freq and now understand it complete. Thanks so much for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Dec 2012 18:31:03 GMT</pubDate>
    <dc:creator>CSONNYC</dc:creator>
    <dc:date>2012-12-03T18:31:03Z</dc:date>
    <item>
      <title>INTNX producing unexpected results</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INTNX-producing-unexpected-results/m-p/88732#M18880</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a datastep that looks like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data new_orig1;&lt;/P&gt;&lt;P&gt;set new_orig;&lt;/P&gt;&lt;P&gt;format orig_date mmddyy10. MaturityDate mmddyy10. groupdsfinalscaled 12.;&lt;/P&gt;&lt;P&gt;orig_date = intnx('quarter','30sep12'd,quarter); &lt;/P&gt;&lt;P&gt;curr_dt = put(put(orig_date,yyq6.),$6.);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I would expect that &lt;EM&gt;all&lt;/EM&gt; the resulting values for "orig_date" would be Oct 1, 2012, since the input date, '30sep12'd, is a constant for all the observations. But for some reason, this only occurs for a subset of my resulting dataset. The rest of the observations have "orig_date" values such as 1/1/2013, 4/1/2013, 7/1/2013, 10/1/2013. In other words, always the beginnings of quarters, but not 10/1/2012 as I had expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone explain why?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Much appreciated!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2012 17:33:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INTNX-producing-unexpected-results/m-p/88732#M18880</guid>
      <dc:creator>CSONNYC</dc:creator>
      <dc:date>2012-12-03T17:33:40Z</dc:date>
    </item>
    <item>
      <title>Re: INTNX producing unexpected results</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INTNX-producing-unexpected-results/m-p/88733#M18881</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is quarter ever equal to 1, because that would give you the date you expect. If not, then no....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;data new_orig1;&lt;/P&gt;&lt;P&gt;format orig_date mmddyy10. ;&lt;/P&gt;&lt;P&gt;orig_date = intnx('quarter','30sep12'd,1);&lt;/P&gt;&lt;P&gt;curr_dt = put(put(orig_date,yyq6.),$6.);&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2012 17:48:12 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INTNX-producing-unexpected-results/m-p/88733#M18881</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2012-12-03T17:48:12Z</dc:date>
    </item>
    <item>
      <title>Re: INTNX producing unexpected results</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INTNX-producing-unexpected-results/m-p/88734#M18882</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Reeza! You're right, all the sample syntax for the INTNX statement I am finding has a constant as the interval. I'm not sure how exactly having the interval set to "quarter" instead of "1" results in some of the resulting observations having an "orig_date" of 10/1/2012, some having 1/1/2013, some having 4/1/2013, etc. Do you know how this works?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2012 18:07:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INTNX-producing-unexpected-results/m-p/88734#M18882</guid>
      <dc:creator>CSONNYC</dc:creator>
      <dc:date>2012-12-03T18:07:58Z</dc:date>
    </item>
    <item>
      <title>Re: INTNX producing unexpected results</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INTNX-producing-unexpected-results/m-p/88735#M18883</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The third parameter in INTNX is the number of intervals by which to shift the date. If you want the quarter where your date belongs, use 0 as the third parameter (+1 gives you the next, -1, the previous, quarter)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PG&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2012 18:23:37 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INTNX-producing-unexpected-results/m-p/88735#M18883</guid>
      <dc:creator>PGStats</dc:creator>
      <dc:date>2012-12-03T18:23:37Z</dc:date>
    </item>
    <item>
      <title>Re: INTNX producing unexpected results</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INTNX-producing-unexpected-results/m-p/88736#M18884</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The parameters for intnx are&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Interval - "Quarter" &lt;/P&gt;&lt;P&gt;Start date -&amp;nbsp; '30Sep2012'd&lt;/P&gt;&lt;P&gt;INCREMENT - quarter (variable I'm assuming????)&lt;/P&gt;&lt;P&gt;Alignment (optional) - default = start of period.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You've set your interval to quarters, so every 3 months and your start date to the end of September. The next quarter or interval would be October 1, 2012.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Your increment is set to a variable named quarter. Run a proc freq on your quarter variable to see what that value contains, my guess is 1/2/3/4/5...etc, so your original start date is being incremented by the value in each of the observations.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;proc freq data=&amp;nbsp; new_orig;&lt;/P&gt;&lt;P&gt;table quarter;&lt;/P&gt;&lt;P&gt;run;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2012 18:23:58 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INTNX-producing-unexpected-results/m-p/88736#M18884</guid>
      <dc:creator>Reeza</dc:creator>
      <dc:date>2012-12-03T18:23:58Z</dc:date>
    </item>
    <item>
      <title>Re: INTNX producing unexpected results</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INTNX-producing-unexpected-results/m-p/88737#M18885</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You're right! I just ran a proc freq and now understand it complete. Thanks so much for your help!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Dec 2012 18:31:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INTNX-producing-unexpected-results/m-p/88737#M18885</guid>
      <dc:creator>CSONNYC</dc:creator>
      <dc:date>2012-12-03T18:31:03Z</dc:date>
    </item>
  </channel>
</rss>

