<?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: How do I filter based on the previous 30 days in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-do-I-filter-based-on-the-previous-30-days/m-p/504426#M11283</link>
    <description>&lt;P&gt;I'm a little confused by the description. It looks like that 3rd column shows the date as a number &lt;EM&gt;multiplied &lt;/EM&gt;by the number of claims on that date.&lt;/P&gt;&lt;P&gt;If you just filter the first column using the method recommended by Skillman, and then sum the second column, won't that give you what you are looking for?&lt;/P&gt;</description>
    <pubDate>Mon, 15 Oct 2018 18:38:19 GMT</pubDate>
    <dc:creator>ewv</dc:creator>
    <dc:date>2018-10-15T18:38:19Z</dc:date>
    <item>
      <title>How do I filter based on the previous 30 days</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-do-I-filter-based-on-the-previous-30-days/m-p/504316#M11282</link>
      <description>&lt;P&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;Hi,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;I am currently using &lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;SAS® Visual Analytics Hub (V 7.4). &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;The dataset I have has multiple rows&amp;nbsp;(representing insurance claims) for a given date. I am looking to show the number of claims in the last 30 days, going back from todays date.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;I have previously tried the instructions for dynamic filtering outlined by skillman listed here: &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Visual-Analytics/Dynamic-Date-Filters/m-p/149212/highlight/true#M474" target="_blank"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;https://communities.sas.com/t5/SAS-Visual-Analytics/Dynamic-Date-Filters/td-p/149208&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;However this is not working for me, as I have multiple rows (representing insurance claims)&amp;nbsp;for a given date, when I treat the date as numeric is sums all the date numbers for this date. The attachment shows three columns the first is a list of dates in chronological order (representing the dates claims are opened), the second is the number of claims opened on that day and the 3rd shows the date as a number. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;Can anybody recommend an alternative way of filtering based on the last 30 days? Or advise on how to manipulate the instructions in the aforementioned post to suit&amp;nbsp; the task at hand. &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;&lt;SPAN class="sapMText sapMTextMaxWidth" style="text-align: left; direction: inherit;"&gt;Niamh,&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2018 14:12:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/How-do-I-filter-based-on-the-previous-30-days/m-p/504316#M11282</guid>
      <dc:creator>Niamh</dc:creator>
      <dc:date>2018-10-15T14:12:59Z</dc:date>
    </item>
    <item>
      <title>Re: How do I filter based on the previous 30 days</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-do-I-filter-based-on-the-previous-30-days/m-p/504426#M11283</link>
      <description>&lt;P&gt;I'm a little confused by the description. It looks like that 3rd column shows the date as a number &lt;EM&gt;multiplied &lt;/EM&gt;by the number of claims on that date.&lt;/P&gt;&lt;P&gt;If you just filter the first column using the method recommended by Skillman, and then sum the second column, won't that give you what you are looking for?&lt;/P&gt;</description>
      <pubDate>Mon, 15 Oct 2018 18:38:19 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/How-do-I-filter-based-on-the-previous-30-days/m-p/504426#M11283</guid>
      <dc:creator>ewv</dc:creator>
      <dc:date>2018-10-15T18:38:19Z</dc:date>
    </item>
    <item>
      <title>Re: How do I filter based on the previous 30 days</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-do-I-filter-based-on-the-previous-30-days/m-p/504643#M11291</link>
      <description>&lt;P&gt;Thank you for your response.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That is what I am looking for however the filter does not seem to work. When I use the filter described in the post the table is empty i.e. nothing is included in the filter. I applied the filter to the entire table and swapped &amp;nbsp;'VA_Date'n for the date variable in the first column. Also that last column is not needed, I have added it to show what the result of the 'treatas' function is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TreatAs(_Number_, 'UR_Open_Day'n)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The aggregation of the variable is set as sum, I am unsure as to why it is using&amp;nbsp;a multiplication as you say.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kind Regards,&lt;/P&gt;&lt;P&gt;Niamh&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Oct 2018 09:06:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/How-do-I-filter-based-on-the-previous-30-days/m-p/504643#M11291</guid>
      <dc:creator>Niamh</dc:creator>
      <dc:date>2018-10-16T09:06:55Z</dc:date>
    </item>
    <item>
      <title>Re: How do I filter based on the previous 30 days</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-do-I-filter-based-on-the-previous-30-days/m-p/504825#M11298</link>
      <description>Can you try changing TreatAs(_Number_, 'UR_Open_Day'n) to TreatAs(_Number_, UR_Open_Day) and seeing if that helps?</description>
      <pubDate>Tue, 16 Oct 2018 18:31:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/How-do-I-filter-based-on-the-previous-30-days/m-p/504825#M11298</guid>
      <dc:creator>ewv</dc:creator>
      <dc:date>2018-10-16T18:31:28Z</dc:date>
    </item>
    <item>
      <title>Re: How do I filter based on the previous 30 days</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/How-do-I-filter-based-on-the-previous-30-days/m-p/504941#M11301</link>
      <description>&lt;P&gt;If you are updating your data daily, then another way to do this would be to add a column to your data before loading which is a day counter based on today's date. So the day counter = 0 for today's date, = 1 for yesterday, = 2 for the day before yesterday and so on.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Then in VA&amp;nbsp; just create a simple filter: day counter &amp;lt;= 30.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;To create the day counter in your data:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;Day_Counter = today() - UR_Open_Day;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Wed, 17 Oct 2018 01:17:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/How-do-I-filter-based-on-the-previous-30-days/m-p/504941#M11301</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2018-10-17T01:17:06Z</dc:date>
    </item>
  </channel>
</rss>

