<?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: Last 3 Quarters in Dimension in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Last-3-Quarters-in-Dimension/m-p/1407878#M815042</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suggest having a "quarter counter" in your data. Add this field in the script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Year(Date) * 4 + [Quarter Number]&amp;nbsp; AS [Quarter Counter].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(where [Quarter Number] is your... quarter number i.e. 1 for Q1, 2 for Q2, etc.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, in your set analysis : [Quarter Counter] = {'&amp;gt;=$(=MAX([Quarter Counter] - 3))'}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Brice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 13 Sep 2017 12:34:00 GMT</pubDate>
    <dc:creator>Brice-SACCUCCI</dc:creator>
    <dc:date>2017-09-13T12:34:00Z</dc:date>
    <item>
      <title>Last 3 Quarters in Dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Last-3-Quarters-in-Dimension/m-p/1407876#M815040</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 a table with the following data&lt;/P&gt;&lt;P&gt;Dimensions: Product (String data), Quarter (Example format: Q3-17)&lt;/P&gt;&lt;P&gt;Measure: sum(value)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Quarter field has data like this&lt;/P&gt;&lt;P&gt;Q3-16&lt;/P&gt;&lt;P&gt;Q4-16&lt;/P&gt;&lt;P&gt;Q1-17&lt;BR /&gt;Q2-17&lt;/P&gt;&lt;P&gt;Q3-17&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My question is, in the chart by default i can see all the above quarters but i want to show only the last 3 quarters (means only Q1-17,Q2-17,Q3-17). I tried writing manually using pick(match()) &amp;amp; is working fine but i want it to be automatic.&lt;/P&gt;&lt;P&gt;Means, in future, if Q4-17 comes into the picture, it should show only Q2-17,Q3-17,Q4-17 etc.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So, how to achieve it to show only the last (latest) 3 quarters in the chart ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks:) &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-3-Quarters-in-Dimension/m-p/1407876#M815040</guid>
      <dc:creator>mohan2391</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Last 3 Quarters in Dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Last-3-Quarters-in-Dimension/m-p/1407877#M815041</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mohan,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;you have the actual quarter with this: ceil(month(today())/3)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;so you should compare your quarter data with the actual quarter and compare your "year" part from the quarter field with the actual year.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;and with this you can have exactly the last 3 quarters:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="font-size: 13px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;=if(mid(Quarter,2,1)&amp;lt;= ceil(month(today())/3) and mid(Quarter,2,1)&amp;gt; ceil(month(today())/3)-3 and mid(Quarter,4,2)= right(year(today()),2), Quarter)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Youssef&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Sep 2017 12:30:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-3-Quarters-in-Dimension/m-p/1407877#M815041</guid>
      <dc:creator>YoussefBelloum</dc:creator>
      <dc:date>2017-09-13T12:30:33Z</dc:date>
    </item>
    <item>
      <title>Re: Last 3 Quarters in Dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Last-3-Quarters-in-Dimension/m-p/1407878#M815042</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suggest having a "quarter counter" in your data. Add this field in the script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Year(Date) * 4 + [Quarter Number]&amp;nbsp; AS [Quarter Counter].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;(where [Quarter Number] is your... quarter number i.e. 1 for Q1, 2 for Q2, etc.)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then, in your set analysis : [Quarter Counter] = {'&amp;gt;=$(=MAX([Quarter Counter] - 3))'}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Brice&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Sep 2017 12:34:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-3-Quarters-in-Dimension/m-p/1407878#M815042</guid>
      <dc:creator>Brice-SACCUCCI</dc:creator>
      <dc:date>2017-09-13T12:34:00Z</dc:date>
    </item>
    <item>
      <title>Re: Last 3 Quarters in Dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Last-3-Quarters-in-Dimension/m-p/1407879#M815043</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to tell you few things.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. i'm getting this quarter field from the database itself and there is no date field&lt;/P&gt;&lt;P&gt;2. i want it as a dimension to show the latest 3 quarters - not as expression&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Sep 2017 12:55:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-3-Quarters-in-Dimension/m-p/1407879#M815043</guid>
      <dc:creator>mohan2391</dc:creator>
      <dc:date>2017-09-13T12:55:51Z</dc:date>
    </item>
    <item>
      <title>Re: Last 3 Quarters in Dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Last-3-Quarters-in-Dimension/m-p/1407880#M815044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So try the solution i gave you and tell me.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Sep 2017 13:03:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-3-Quarters-in-Dimension/m-p/1407880#M815044</guid>
      <dc:creator>YoussefBelloum</dc:creator>
      <dc:date>2017-09-13T13:03:33Z</dc:date>
    </item>
    <item>
      <title>Re: Last 3 Quarters in Dimension</title>
      <link>https://community.qlik.com/t5/QlikView/Last-3-Quarters-in-Dimension/m-p/1407881#M815045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can extract the Quarter Number from the database field.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For instance: right(subfield(Quarter, '-', 1), 1) as [Quarter Number].&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try the solution I suggested and tick the option to suppress 0 values. You could also use an aggr to compute a calculated dimension but it's too complex and heavy IMHO.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Sep 2017 13:05:01 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-3-Quarters-in-Dimension/m-p/1407881#M815045</guid>
      <dc:creator>Brice-SACCUCCI</dc:creator>
      <dc:date>2017-09-13T13:05:01Z</dc:date>
    </item>
  </channel>
</rss>

