<?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: Rolling Dates in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Rolling-Dates/m-p/183486#M1285</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;A _jive_internal="true" class="jiveTT-hover-user jive-username-link" data-avatarid="1993" data-externalid="" data-presence="null" data-userid="830907" data-username="mjaitly" href="https://communities.sas.com/people/mjaitly" id="jive-83090729984860551828186" style="padding: 0 3px 0 0; font-weight: inherit; font-style: inherit; font-size: 1.1em; font-family: inherit; color: #0e66ba;"&gt;mjaitly&lt;/A&gt;&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for posting your question! Did you get an answer that was helpful or correct? If so, feel free to mark as appropriate so that other community members can reference what worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Anna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 29 Oct 2014 17:52:56 GMT</pubDate>
    <dc:creator>AnnaBrown</dc:creator>
    <dc:date>2014-10-29T17:52:56Z</dc:date>
    <item>
      <title>Rolling Dates</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Rolling-Dates/m-p/183482#M1281</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 need some help with dates. I have put up the range slider date controls however I want it in a way such that whenever I open the report, it should automatically show me the data for the last 7days or for last 7 months (in monthly reports). Can anyone let me know the code for this? Also is there any other alternative for date controls other than the range slider (I feel it occupies too much space).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Manish.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Oct 2014 07:01:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Rolling-Dates/m-p/183482#M1281</guid>
      <dc:creator>mjaitly</dc:creator>
      <dc:date>2014-10-14T07:01:35Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling Dates</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Rolling-Dates/m-p/183483#M1282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In this case, I believe you would have to go for sas macros. Injecting certain macro codes would do the job for you. I have given you the link that might help you up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A class="active_link" href="http://support.sas.com/resources/papers/proceedings13/343-2013.pdf" title="http://support.sas.com/resources/papers/proceedings13/343-2013.pdf"&gt;http://support.sas.com/resources/papers/proceedings13/343-2013.pdf&lt;/A&gt;&lt;/P&gt;&lt;P&gt;greetings&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Oct 2014 12:12:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Rolling-Dates/m-p/183483#M1282</guid>
      <dc:creator>sat_lr</dc:creator>
      <dc:date>2014-10-14T12:12:31Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling Dates</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Rolling-Dates/m-p/183484#M1283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manish,&lt;/P&gt;&lt;P&gt;I solved this problem using a new calculated field.&lt;/P&gt;&lt;P&gt;If you define the new calculated field result as 1 or 0 depending on the date versus today-7,&lt;/P&gt;&lt;P&gt;you can use this field as a filter for the range slider.&lt;/P&gt;&lt;P&gt;Just try the list option to be able to select out of the 7 selected days. &lt;/P&gt;&lt;P&gt;The list box often works fine when the number of options is rathen small.&lt;/P&gt;&lt;P&gt;greetings and good luck.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Oct 2014 17:49:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Rolling-Dates/m-p/183484#M1283</guid>
      <dc:creator>PeterWijers</dc:creator>
      <dc:date>2014-10-15T17:49:43Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling Dates</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Rolling-Dates/m-p/183485#M1284</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 did something similar.&amp;nbsp; In my case I have 2 dates : A system date of the data (called 'latestbusinessdayend') and a hotel occupancy date. (called 'occupancyDate').&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I wanted a way to set a report to only look at say, 7 - 14 days from today or the prior 7 - 14 days.&amp;nbsp; The formula below creates a series of numbers (from negative to positive based on how far the occupancy date is from the system date)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was able to accomplish this using the TreatAs function that is in version 6.4 and higher:&amp;nbsp; Note:&amp;nbsp; I did have a version before 6.4 that did this but was way more complex....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;TreatAs(_Number_, 'occupancyDate'n) - TreatAs(_Number_, 'latestBusinessDayEnd'n)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Daysfromsystemdate.jpg" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/7754_Daysfromsystemdate.jpg" width="450" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To implement this, use a date selector of choice then use this as a filter on your dates.&amp;nbsp; For example, the filter below will set the dates to be selected from +1 to +7&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;( 'Days from LBDE TreateAS'n &amp;gt; 1 ) AND ( 'Days from LBDE TreateAS'n &amp;lt;= 7 )&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="TreatasFilter.jpg" class="jive-image" src="https://communities.sas.com/legacyfs/online/7755_TreatasFilter.jpg" /&gt;&lt;/P&gt;&lt;P&gt;In my opinion the date slider works best for selections as it is pretty easy for the user.&amp;nbsp;&amp;nbsp; If you want to make it smaller, you can put a non-selectable text box next to it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Good Luck,&amp;nbsp; Roger&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Oct 2014 21:23:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Rolling-Dates/m-p/183485#M1284</guid>
      <dc:creator>RDHamm</dc:creator>
      <dc:date>2014-10-28T21:23:35Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling Dates</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Rolling-Dates/m-p/183486#M1285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;STRONG style="font-size: 12px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; background-color: #ffffff;"&gt;&lt;A _jive_internal="true" class="jiveTT-hover-user jive-username-link" data-avatarid="1993" data-externalid="" data-presence="null" data-userid="830907" data-username="mjaitly" href="https://communities.sas.com/people/mjaitly" id="jive-83090729984860551828186" style="padding: 0 3px 0 0; font-weight: inherit; font-style: inherit; font-size: 1.1em; font-family: inherit; color: #0e66ba;"&gt;mjaitly&lt;/A&gt;&lt;/STRONG&gt;,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for posting your question! Did you get an answer that was helpful or correct? If so, feel free to mark as appropriate so that other community members can reference what worked.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best,&lt;/P&gt;&lt;P&gt;Anna&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Oct 2014 17:52:56 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Rolling-Dates/m-p/183486#M1285</guid>
      <dc:creator>AnnaBrown</dc:creator>
      <dc:date>2014-10-29T17:52:56Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling Dates</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Rolling-Dates/m-p/183487#M1286</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Peter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your reply. Can you please let me know the code if possible? I am tied up real ad with several reports so am not really having the time to experiment.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Manish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2014 07:01:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Rolling-Dates/m-p/183487#M1286</guid>
      <dc:creator>mjaitly</dc:creator>
      <dc:date>2014-10-30T07:01:45Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling Dates</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Rolling-Dates/m-p/183488#M1287</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No not yet. I will need the code in the calculated field. By default I need the last 7 days or months from Jan'14 however if the user wants he should be able to choose the dates from the range slider control.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2014 07:17:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Rolling-Dates/m-p/183488#M1287</guid>
      <dc:creator>mjaitly</dc:creator>
      <dc:date>2014-10-30T07:17:33Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling Dates</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Rolling-Dates/m-p/183489#M1288</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi mjaitly&lt;/P&gt;&lt;P&gt;Here a screenshot of the calculated_item that detects if the record is within the last three years.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Year_range.jpg" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/7777_Year_range.jpg" width="450" /&gt;&lt;/P&gt;&lt;P&gt;If you use this calc.item as a filter for the selction_bar as I did or with a range_slider as you want to do.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="Year_rangef.jpg" class="jive-image" src="https://communities.sas.com/legacyfs/online/7778_Year_rangef.jpg" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Succes,&amp;nbsp;&amp;nbsp;&amp;nbsp; Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Oct 2014 12:04:11 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Rolling-Dates/m-p/183489#M1288</guid>
      <dc:creator>PeterWijers</dc:creator>
      <dc:date>2014-10-30T12:04:11Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling Dates</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Rolling-Dates/m-p/183490#M1289</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Peter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Belated thanks for sharing this however when I give the below formula it does not work or in other words dates do not roll..they freeze. My idea is to set dates rolling for the last 7 days in my daily report. However when I logged in today the data still shows from 14th Nov to 18th Nov. Genration_Date is a field in the LASR table and is the date of transaction. In my daily report I want to see by default (that is when I log in every morning) data only for the last 7 days but the below formula in a calculated item does not work.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF ( DayOfMonth('Generation_Date'n) &amp;gt;= ( DayOfMonth(DatePart(Now())) - 7 ) )&lt;/P&gt;&lt;P&gt;RETURN 1&lt;/P&gt;&lt;P&gt;ELSE 0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please let me know what is wrong with this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Manish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Nov 2014 05:39:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Rolling-Dates/m-p/183490#M1289</guid>
      <dc:creator>mjaitly</dc:creator>
      <dc:date>2014-11-21T05:39:18Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling Dates</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Rolling-Dates/m-p/183491#M1290</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Manish,&lt;/P&gt;&lt;P&gt;I did set-up the formula in this way and it seems to work today.&amp;nbsp; (Have to test it of cource in the comming days)&lt;/P&gt;&lt;P&gt;&lt;IMG alt="21-11-2014 07-03-51.jpg" class="jive-image-thumbnail jive-image" height="162" src="https://communities.sas.com/legacyfs/online/7992_21-11-2014 07-03-51.jpg" width="555" /&gt;&lt;/P&gt;&lt;P&gt;Please notice that I do use DayOfYear and not DayOfMonth.&lt;/P&gt;&lt;P&gt;While testing I found the follwing results where FullFormula is the calculated item as above.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="21-11-2014 07-04-10.jpg" class="jive-image-thumbnail jive-image" src="https://communities.sas.com/legacyfs/online/7993_21-11-2014 07-04-10.jpg" width="450" /&gt;&lt;/P&gt;&lt;P&gt;Seems to work for today because I already used the filter for this table as below.&lt;/P&gt;&lt;P&gt;&lt;IMG alt="21-11-2014 07-04-24.jpg" class="jive-image" src="https://communities.sas.com/legacyfs/online/7994_21-11-2014 07-04-24.jpg" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please try this one, and we will see the coming days if it works like it does for me with the year selection.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Greetings&amp;nbsp; Peter&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Nov 2014 06:10:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Rolling-Dates/m-p/183491#M1290</guid>
      <dc:creator>PeterWijers</dc:creator>
      <dc:date>2014-11-21T06:10:02Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling Dates</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Rolling-Dates/m-p/183492#M1291</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Peter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can you put up the written code instead of the visual. I am a little confused about the betweeninclusive..where to put exactly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Manish&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Nov 2014 06:15:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Rolling-Dates/m-p/183492#M1291</guid>
      <dc:creator>mjaitly</dc:creator>
      <dc:date>2014-11-21T06:15:54Z</dc:date>
    </item>
    <item>
      <title>Re: Rolling Dates</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Rolling-Dates/m-p/183493#M1292</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Manish,&lt;/P&gt;&lt;P&gt;here the code.&lt;/P&gt;&lt;P&gt;I used the Between code because in this data source there is also predicted info in the future.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF ( DayOfYear(DatePart(Now())) - DayOfYear(Date) ) Between [inclusive] (0, 7)&lt;/P&gt;&lt;P&gt;RETURN 1&lt;/P&gt;&lt;P&gt;ELSE 0&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Nov 2014 07:30:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Rolling-Dates/m-p/183493#M1292</guid>
      <dc:creator>PeterWijers</dc:creator>
      <dc:date>2014-11-21T07:30:41Z</dc:date>
    </item>
  </channel>
</rss>

