<?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: Date &amp; Week Numbers in SAS VA in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Date-Week-Numbers-in-SAS-VA/m-p/153605#M612</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sat_Ir,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have a dataset with a date&amp;nbsp; (Invoice date) you can use the week number function&amp;nbsp;&amp;nbsp; (VA 6.3)&lt;/P&gt;&lt;P&gt;Create a new Calculated Item and use the formula&amp;nbsp; week number(Invoice date).&lt;/P&gt;&lt;P&gt;Now you get the week number of the Invoice date.&amp;nbsp; Do not forget to switch the numeric field to a Category before you start using it.&lt;/P&gt;&lt;P&gt;Ones it is a category, you can use it as a label in graphs or tables.&lt;/P&gt;&lt;P&gt;Sure this will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise this is the mathematical function&lt;/P&gt;&lt;P&gt;&lt;SPAN style="; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;week_nr= INT(1+int((date+(3-&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;mod(weekday(date)+&lt;/SPAN&gt;&lt;SPAN style="; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;5&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;7&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;))-intnx(&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;'year'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;,date+(&lt;/SPAN&gt;&lt;SPAN style="; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;3&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;-mod(weekday(date)+&lt;/SPAN&gt;&lt;SPAN style="; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;5&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;7&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;)),&lt;/SPAN&gt;&lt;SPAN style="; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;))/&lt;/SPAN&gt;&lt;SPAN style="; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;7&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 27 Jun 2014 04:32:01 GMT</pubDate>
    <dc:creator>PeterWijers</dc:creator>
    <dc:date>2014-06-27T04:32:01Z</dc:date>
    <item>
      <title>Date &amp; Week Numbers in SAS VA</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Date-Week-Numbers-in-SAS-VA/m-p/153604#M611</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 invoice list with dates. As the customer wants to see sales by week, I would like to consume the date in the form of Weeks with numbers. ex: week 1, week 2 week 3 with sales figures.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;All I have is dates. I am able to manipulate my dates with all the options available like weekdays, quarter (q1, q2, q3, q4) etc. But I couldn't get weeks with number option.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pls help with your suggestions. Thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-satlr&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 24 Jun 2014 07:13:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Date-Week-Numbers-in-SAS-VA/m-p/153604#M611</guid>
      <dc:creator>sat_lr</dc:creator>
      <dc:date>2014-06-24T07:13:04Z</dc:date>
    </item>
    <item>
      <title>Re: Date &amp; Week Numbers in SAS VA</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Date-Week-Numbers-in-SAS-VA/m-p/153605#M612</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sat_Ir,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have a dataset with a date&amp;nbsp; (Invoice date) you can use the week number function&amp;nbsp;&amp;nbsp; (VA 6.3)&lt;/P&gt;&lt;P&gt;Create a new Calculated Item and use the formula&amp;nbsp; week number(Invoice date).&lt;/P&gt;&lt;P&gt;Now you get the week number of the Invoice date.&amp;nbsp; Do not forget to switch the numeric field to a Category before you start using it.&lt;/P&gt;&lt;P&gt;Ones it is a category, you can use it as a label in graphs or tables.&lt;/P&gt;&lt;P&gt;Sure this will work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Otherwise this is the mathematical function&lt;/P&gt;&lt;P&gt;&lt;SPAN style="; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;week_nr= INT(1+int((date+(3-&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;mod(weekday(date)+&lt;/SPAN&gt;&lt;SPAN style="; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;5&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;7&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;))-intnx(&lt;/SPAN&gt;&lt;SPAN style="color: #800080; font-size: 10pt; font-family: Courier New;"&gt;'year'&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;,date+(&lt;/SPAN&gt;&lt;SPAN style="; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;3&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;-mod(weekday(date)+&lt;/SPAN&gt;&lt;SPAN style="; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;5&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;,&lt;/SPAN&gt;&lt;SPAN style="; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;7&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;)),&lt;/SPAN&gt;&lt;SPAN style="; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;0&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;))/&lt;/SPAN&gt;&lt;SPAN style="; color: #008080; font-size: 10pt; font-family: Courier New;"&gt;&lt;STRONG&gt;7&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 10pt; font-family: Courier New;"&gt;));&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jun 2014 04:32:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Date-Week-Numbers-in-SAS-VA/m-p/153605#M612</guid>
      <dc:creator>PeterWijers</dc:creator>
      <dc:date>2014-06-27T04:32:01Z</dc:date>
    </item>
    <item>
      <title>Re: Date &amp; Week Numbers in SAS VA</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Date-Week-Numbers-in-SAS-VA/m-p/153606#M613</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;brilliant! thanks Wijers. will try to incorporate this expression.&lt;/P&gt;&lt;P&gt; cheers.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;satlr&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 07 Jul 2014 06:36:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Date-Week-Numbers-in-SAS-VA/m-p/153606#M613</guid>
      <dc:creator>sat_lr</dc:creator>
      <dc:date>2014-07-07T06:36:52Z</dc:date>
    </item>
    <item>
      <title>Re: Date &amp; Week Numbers in SAS VA</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Date-Week-Numbers-in-SAS-VA/m-p/231068#M2699</link>
      <description>Hi, my problem is somewhat similar as I would like to use WeekNum as a Date Measure for the Geo Bubble Map looping animation slider. WeekNum once converted to Category doesn't allow it to be used as an Animation variable. Any workaround?</description>
      <pubDate>Thu, 22 Oct 2015 00:20:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Date-Week-Numbers-in-SAS-VA/m-p/231068#M2699</guid>
      <dc:creator>NikNizan</dc:creator>
      <dc:date>2015-10-22T00:20:04Z</dc:date>
    </item>
    <item>
      <title>Re: Date &amp; Week Numbers in SAS VA</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Date-Week-Numbers-in-SAS-VA/m-p/231139#M2703</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;Animation requires a date, time, or datetime variable.&lt;BR /&gt;&lt;BR /&gt;Unfortunately, I don't think there is any way to create a date from week number in VA.&lt;BR /&gt;&lt;BR /&gt;In theory such a thing could be possible if you provide the year and the week number, but VA does not offer a function to do this calculation.&lt;BR /&gt;&lt;BR /&gt;Thanks,&lt;BR /&gt;Sam</description>
      <pubDate>Thu, 22 Oct 2015 13:11:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Date-Week-Numbers-in-SAS-VA/m-p/231139#M2703</guid>
      <dc:creator>Sam_SAS</dc:creator>
      <dc:date>2015-10-22T13:11:04Z</dc:date>
    </item>
  </channel>
</rss>

