<?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 Filtering out dates older than 1 year in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Filtering-out-dates-older-than-1-year/m-p/257562#M3623</link>
    <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a table that contins a list of repairs recorded over the last 2 years. I am building af repair time KPI based on this list. However the KPI should only reflect the repair time for repairs completed over the last year.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Table example&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Created date&amp;nbsp; Repair time&lt;/P&gt;
&lt;P&gt;1/2/2014&amp;nbsp; 10&lt;/P&gt;
&lt;P&gt;1/5/2015 1&lt;/P&gt;
&lt;P&gt;1/6/2015 2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to dynamically filter out the first so that the Created date should by higher than now() - 360 days. How do i do this in SAS VA?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 18 Mar 2016 10:50:28 GMT</pubDate>
    <dc:creator>JanNeergaard</dc:creator>
    <dc:date>2016-03-18T10:50:28Z</dc:date>
    <item>
      <title>Filtering out dates older than 1 year</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Filtering-out-dates-older-than-1-year/m-p/257562#M3623</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have a table that contins a list of repairs recorded over the last 2 years. I am building af repair time KPI based on this list. However the KPI should only reflect the repair time for repairs completed over the last year.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Table example&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Created date&amp;nbsp; Repair time&lt;/P&gt;
&lt;P&gt;1/2/2014&amp;nbsp; 10&lt;/P&gt;
&lt;P&gt;1/5/2015 1&lt;/P&gt;
&lt;P&gt;1/6/2015 2&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I want to dynamically filter out the first so that the Created date should by higher than now() - 360 days. How do i do this in SAS VA?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Many thanks&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2016 10:50:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Filtering-out-dates-older-than-1-year/m-p/257562#M3623</guid>
      <dc:creator>JanNeergaard</dc:creator>
      <dc:date>2016-03-18T10:50:28Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering out dates older than 1 year</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Filtering-out-dates-older-than-1-year/m-p/257604#M3624</link>
      <description>&lt;P&gt;You can do this by adding a filter as follows on your visual:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;TreatAs(_Date_,(TreatAs(_Number_,'&amp;lt;&amp;lt;your datetime item&amp;gt;&amp;gt;)/86400)) &amp;gt;= TreatAs(_Date_,((TreatAs(_Number_,Now())/86400)-360))&lt;/P&gt;</description>
      <pubDate>Fri, 18 Mar 2016 12:53:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Filtering-out-dates-older-than-1-year/m-p/257604#M3624</guid>
      <dc:creator>EWS</dc:creator>
      <dc:date>2016-03-18T12:53:30Z</dc:date>
    </item>
    <item>
      <title>Re: Filtering out dates older than 1 year</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Filtering-out-dates-older-than-1-year/m-p/257940#M3651</link>
      <description>&lt;P&gt;Worked like a charm. However in my case i had to do this&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;TreatAs(_Date_,(TreatAs(_Number_,'&amp;lt;&amp;lt;your datetime item&amp;gt;&amp;gt;))) &amp;gt;= TreatAs(_Date_,((TreatAs(_Number_,Now())/86400)-36​0))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;because i only had the date and not the time.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Mar 2016 11:46:33 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Filtering-out-dates-older-than-1-year/m-p/257940#M3651</guid>
      <dc:creator>JanNeergaard</dc:creator>
      <dc:date>2016-03-21T11:46:33Z</dc:date>
    </item>
  </channel>
</rss>

