<?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: week selection over the end of the year in New SAS User</title>
    <link>https://communities.sas.com/t5/New-SAS-User/week-selection-over-the-end-of-the-year/m-p/691823#M24862</link>
    <description>&lt;P&gt;So you need to find, from a given week, the previous 5 weeks?&lt;/P&gt;
&lt;P&gt;Anyway, since you have date-related values, you should store them as SAS dates and use the appropriate display format; then it would be subtraction of 7 or INTNX().&lt;/P&gt;</description>
    <pubDate>Thu, 15 Oct 2020 13:24:11 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2020-10-15T13:24:11Z</dc:date>
    <item>
      <title>week selection over the end of the year</title>
      <link>https://communities.sas.com/t5/New-SAS-User/week-selection-over-the-end-of-the-year/m-p/691820#M24861</link>
      <description>&lt;P&gt;dear SAS experts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I must select data over several weeks and over the end of the year.&lt;/P&gt;&lt;P&gt;In the table, I have a column JAHR (year) and a column KW (week), as in the attached file.&lt;/P&gt;&lt;P&gt;In the week 1 (KW = 1), I Need to select the green selection.&lt;/P&gt;&lt;P&gt;In the week 1 (KW = 4), I Need to select the&amp;nbsp;yellow selection.&lt;/P&gt;&lt;P&gt;In the week 1 (KW = 5), I Need to select the red selection.&lt;/P&gt;&lt;P&gt;How could I proceed?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 13:11:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/week-selection-over-the-end-of-the-year/m-p/691820#M24861</guid>
      <dc:creator>PierreYvesILY</dc:creator>
      <dc:date>2020-10-15T13:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: week selection over the end of the year</title>
      <link>https://communities.sas.com/t5/New-SAS-User/week-selection-over-the-end-of-the-year/m-p/691823#M24862</link>
      <description>&lt;P&gt;So you need to find, from a given week, the previous 5 weeks?&lt;/P&gt;
&lt;P&gt;Anyway, since you have date-related values, you should store them as SAS dates and use the appropriate display format; then it would be subtraction of 7 or INTNX().&lt;/P&gt;</description>
      <pubDate>Thu, 15 Oct 2020 13:24:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/week-selection-over-the-end-of-the-year/m-p/691823#M24862</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-10-15T13:24:11Z</dc:date>
    </item>
    <item>
      <title>Re: week selection over the end of the year</title>
      <link>https://communities.sas.com/t5/New-SAS-User/week-selection-over-the-end-of-the-year/m-p/691827#M24863</link>
      <description>&lt;P&gt;I see it's 4 weeks. See this code to illustrate the usefulness of SAS date values:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data want;
input year week;
format
  currdate yymmdd10.
  date weekv7.
;
currdate = input(cats(put(year,z4.),'W',put(week,z2.)),weekv7.);
do date = currdate - 28 to currdate - 1 by 7;
  output;
end;
datalines;
2021 1
2021 4
2021 5
;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 15 Oct 2020 13:37:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/week-selection-over-the-end-of-the-year/m-p/691827#M24863</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2020-10-15T13:37:21Z</dc:date>
    </item>
    <item>
      <title>Re: week selection over the end of the year</title>
      <link>https://communities.sas.com/t5/New-SAS-User/week-selection-over-the-end-of-the-year/m-p/691863#M24868</link>
      <description>Hello Kurt,&lt;BR /&gt;&lt;BR /&gt;thank you for your Suggestion. I could use it to built my solution.&lt;BR /&gt;&lt;BR /&gt;Have a nice evening.&lt;BR /&gt;Regards</description>
      <pubDate>Thu, 15 Oct 2020 15:08:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/New-SAS-User/week-selection-over-the-end-of-the-year/m-p/691863#M24868</guid>
      <dc:creator>PierreYvesILY</dc:creator>
      <dc:date>2020-10-15T15:08:57Z</dc:date>
    </item>
  </channel>
</rss>

