<?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: Display last 12 quarters in SAS VA in SAS Visual Analytics</title>
    <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Display-last-12-quarters-in-SAS-VA/m-p/278889#M4637</link>
    <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13754"&gt;@AndrewHowell﻿&lt;/a&gt;&amp;nbsp;Hi thanks for your answer. There was a change of requirement and I'm trying to chart the last 5 years &amp;amp; last 8 quarters &amp;amp; last 12 months now.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried this SQL expression, which outputs me 2011 (last 5 years). However, it is in DATE format, may I know how to use this to filter out last 5 years inside Report Designer?&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;INTNX('year', BP13_CANCEL_APPLICATION.DTE_CANCEL, -5,'b')&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can i do the same for last 8 qtr &amp;amp; last 12 months?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 21 Jun 2016 01:24:39 GMT</pubDate>
    <dc:creator>qiaojinggg</dc:creator>
    <dc:date>2016-06-21T01:24:39Z</dc:date>
    <item>
      <title>Display last 12 quarters in SAS VA</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Display-last-12-quarters-in-SAS-VA/m-p/278569#M4626</link>
      <description>&lt;P&gt;Hi, I'm trying to display only the&lt;STRONG&gt; last 12 quarters&lt;/STRONG&gt; of data in a &lt;U&gt;bar chart&lt;/U&gt; form in SAS VA. I came up with a SQL expression using &lt;STRONG&gt;INTNX&lt;/STRONG&gt; function that returns me the quarters of DTE_CANCEL in YYQ format. However, I'm not sure how to filter to display only the most recent 12 quarters in Report Designer. &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm quite new to SAS VA so any help/idea will be greatly appreciated. Thank you &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;INTNX('Qtr', BP13_CANCEL_APPLICATION.DTE_CANCEL, 0,'b')&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2016 06:02:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Display-last-12-quarters-in-SAS-VA/m-p/278569#M4626</guid>
      <dc:creator>qiaojinggg</dc:creator>
      <dc:date>2016-06-20T06:02:06Z</dc:date>
    </item>
    <item>
      <title>Re: Display last 12 quarters in SAS VA</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Display-last-12-quarters-in-SAS-VA/m-p/278580#M4627</link>
      <description>&lt;PRE&gt;INTNX('Qtr', BP13_CANCEL_APPLICATION.DTE_CANCEL, 0,'b')&lt;/PRE&gt;&lt;P&gt;This takes you to the beginning ('b') of the DTE_CANCEL variable's current (0) time period ('qtr').&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To get to the beginning of 12 quarters prior to the DTE_CANCEL:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;INTNX('Qtr', BP13_CANCEL_APPLICATION.DTE_CANCEL, -12,'b')&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2016 06:14:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Display-last-12-quarters-in-SAS-VA/m-p/278580#M4627</guid>
      <dc:creator>AndrewHowell</dc:creator>
      <dc:date>2016-06-20T06:14:38Z</dc:date>
    </item>
    <item>
      <title>Re: Display last 12 quarters in SAS VA</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Display-last-12-quarters-in-SAS-VA/m-p/278595#M4629</link>
      <description>&lt;P&gt;Hi thanks for your answer, however it didnt give me the last 12 quarters, instead it generated some random quarters...&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;How can I filter to just display data from last 5 years or last 12 quarters?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 20 Jun 2016 08:08:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Display-last-12-quarters-in-SAS-VA/m-p/278595#M4629</guid>
      <dc:creator>qiaojinggg</dc:creator>
      <dc:date>2016-06-20T08:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: Display last 12 quarters in SAS VA</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Display-last-12-quarters-in-SAS-VA/m-p/278889#M4637</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13754"&gt;@AndrewHowell﻿&lt;/a&gt;&amp;nbsp;Hi thanks for your answer. There was a change of requirement and I'm trying to chart the last 5 years &amp;amp; last 8 quarters &amp;amp; last 12 months now.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried this SQL expression, which outputs me 2011 (last 5 years). However, it is in DATE format, may I know how to use this to filter out last 5 years inside Report Designer?&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;INTNX('year', BP13_CANCEL_APPLICATION.DTE_CANCEL, -5,'b')&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can i do the same for last 8 qtr &amp;amp; last 12 months?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2016 01:24:39 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Display-last-12-quarters-in-SAS-VA/m-p/278889#M4637</guid>
      <dc:creator>qiaojinggg</dc:creator>
      <dc:date>2016-06-21T01:24:39Z</dc:date>
    </item>
    <item>
      <title>Re: Display last 12 quarters in SAS VA</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Display-last-12-quarters-in-SAS-VA/m-p/278895#M4638</link>
      <description>&lt;P&gt;Ok,&amp;nbsp;just to be specific:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;INTNX will &lt;STRONG&gt;not&lt;/STRONG&gt; return a year such as 2011.&lt;/LI&gt;&lt;LI&gt;INTNX returns a SAS date value - a count of days since 1/1/1960. For example, today (21/06/2016) is 20626&lt;/LI&gt;&lt;LI&gt;You can optionally (and typically) apply a format to date values.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data _null_;
       	today=Today();
       	Start_Of_Five_Years_Ago=INTNX('YEAR', Today, -5, 'B');
       	Start_Of_Eight_Qtrs_Ago=INTNX('QTR', Today, -8, 'B');
       	Start_Of_Twelve_Months_Ago=INTNX('MONTH', Today, -12, 'B');
       	* format _ALL_ date9.;
       	put _ALL_;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;Yields:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;today=20626&lt;/LI&gt;&lt;LI&gt;Start_Of_Five_Years_Ago=18628&lt;/LI&gt;&lt;LI&gt;Start_Of_Eight_Qtrs_Ago=19814&lt;/LI&gt;&lt;LI&gt;Start_Of_Twelve_Months_Ago=20240&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;If you uncomment the format statement, then the values remain the same, but are displayed formatted:&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;today=21JUN2016&lt;/LI&gt;&lt;LI&gt;Start_Of_Five_Years_Ago=01JAN2011&lt;/LI&gt;&lt;LI&gt;Start_Of_Eight_Qtrs_Ago=01APR2014&lt;/LI&gt;&lt;LI&gt;Start_Of_Twelve_Months_Ago=01JUN2015&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;"B" will return the beginning of any period, "E" the end, "M" the middle, and "S" the same as the date value passed to the INTNX() function.&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2016 02:15:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Display-last-12-quarters-in-SAS-VA/m-p/278895#M4638</guid>
      <dc:creator>AndrewHowell</dc:creator>
      <dc:date>2016-06-21T02:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: Display last 12 quarters in SAS VA</title>
      <link>https://communities.sas.com/t5/SAS-Visual-Analytics/Display-last-12-quarters-in-SAS-VA/m-p/278915#M4639</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/13754"&gt;@AndrewHowell﻿&lt;/a&gt;&amp;nbsp;May i know where to put that code? Do I put create a new column and put it under the SQL expression?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I managed to somehow filter and chart out last 5 yr/8qtr/12mth, by using INTNX function eg&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;INTNX('year', today(), -5, 'b')&lt;/PRE&gt;&lt;P&gt;which outputs me 2011 in SAS DATE/YEAR format. After that I added this advanced filter in the respective bar chart in Report Designer.&lt;/P&gt;&lt;PRE&gt;'DTE_CANCEL'n &amp;gt;= 'last 5 years'n&lt;/PRE&gt;&lt;P&gt;May I know if this will do the trick? I will need to generate report every period (year, qtr. mth). &amp;nbsp;Will the last 5 years be updated accordingly every period (eg 2012 - 2017; 2013-2018...)?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much for your help &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 21 Jun 2016 05:38:20 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Visual-Analytics/Display-last-12-quarters-in-SAS-VA/m-p/278915#M4639</guid>
      <dc:creator>qiaojinggg</dc:creator>
      <dc:date>2016-06-21T05:38:20Z</dc:date>
    </item>
  </channel>
</rss>

