<?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: Previous month filter in All Things Community</title>
    <link>https://communities.sas.com/t5/All-Things-Community/Previous-month-filter/m-p/716065#M4670</link>
    <description>&lt;P&gt;FYI&amp;nbsp; Unfortunately, i can't provide a detailed response. Next time please provide us with sample data and code, so we can provide a detailed example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the question, as you stated you were able to get it to work with INTNX. So, I would not have any other suggestions for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You provided one line of code, so even if we would use other functions to get the same results it won’t make any difference in your program. Your solution seems good and it's working so I would just leave it as is.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are concerned with improving the program code and analyzing how you can improve the run time length. I would highly recommend taking more Advanced SAS training. In this case, I would suggest a SAS Programming 3 course.&lt;/P&gt;</description>
    <pubDate>Tue, 02 Feb 2021 13:41:24 GMT</pubDate>
    <dc:creator>CarmineVerrell</dc:creator>
    <dc:date>2021-02-02T13:41:24Z</dc:date>
    <item>
      <title>Previous month filter</title>
      <link>https://communities.sas.com/t5/All-Things-Community/Previous-month-filter/m-p/715360#M4669</link>
      <description>&lt;P&gt;I recently ran in to a challenge where I needed to pull the previous month's data from a large list of data with various create dates spanning multiple years.&amp;nbsp; My solution was:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Create a "Begin of Month" calculated field (I used datepart since I was pulling from a timestamp e.g.,&amp;nbsp;INTNX('month',DATEPART( t1.source_actv_create_ts),0)&lt;/LI&gt;&lt;LI&gt;Then I applied the following filter:&amp;nbsp;t1.BEGIN_OF_MONTH is equal to&amp;nbsp;intnx('month',(intnx('month',today(),0)),-1)&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;I don't know if there is a better/easier way to do this, but it works regardless if you are within the same year or are spanning years such as wanting December data and today is January.&amp;nbsp; I anyone has a better method, I would be interested in learning.&lt;/P&gt;</description>
      <pubDate>Fri, 29 Jan 2021 16:37:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/All-Things-Community/Previous-month-filter/m-p/715360#M4669</guid>
      <dc:creator>gregor1</dc:creator>
      <dc:date>2021-01-29T16:37:19Z</dc:date>
    </item>
    <item>
      <title>Re: Previous month filter</title>
      <link>https://communities.sas.com/t5/All-Things-Community/Previous-month-filter/m-p/716065#M4670</link>
      <description>&lt;P&gt;FYI&amp;nbsp; Unfortunately, i can't provide a detailed response. Next time please provide us with sample data and code, so we can provide a detailed example.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks for the question, as you stated you were able to get it to work with INTNX. So, I would not have any other suggestions for you.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You provided one line of code, so even if we would use other functions to get the same results it won’t make any difference in your program. Your solution seems good and it's working so I would just leave it as is.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you are concerned with improving the program code and analyzing how you can improve the run time length. I would highly recommend taking more Advanced SAS training. In this case, I would suggest a SAS Programming 3 course.&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 13:41:24 GMT</pubDate>
      <guid>https://communities.sas.com/t5/All-Things-Community/Previous-month-filter/m-p/716065#M4670</guid>
      <dc:creator>CarmineVerrell</dc:creator>
      <dc:date>2021-02-02T13:41:24Z</dc:date>
    </item>
    <item>
      <title>Re: Previous month filter</title>
      <link>https://communities.sas.com/t5/All-Things-Community/Previous-month-filter/m-p/716144#M4671</link>
      <description>&lt;P&gt;Good to know - thanks Carmine!&lt;/P&gt;</description>
      <pubDate>Tue, 02 Feb 2021 17:20:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/All-Things-Community/Previous-month-filter/m-p/716144#M4671</guid>
      <dc:creator>gregor1</dc:creator>
      <dc:date>2021-02-02T17:20:25Z</dc:date>
    </item>
  </channel>
</rss>

