<?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 calculation of previous qtr value in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/calculation-of-previous-qtr-value/m-p/800723#M1020553</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have the list box for calendaryearquarter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.qlik.com/" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;also i have calendar years 2014, 2015&lt;/P&gt;&lt;P&gt;i have set variables for current quarter &amp;amp; previous quarters as below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vPreviousQtr= if(GetSelectedCount(CalendarYearQuarter)&amp;lt;&amp;gt;1,'' &amp;amp;if(RIGHT(CalendarYearQuarter,1)=1,LEFT(CalendarYearQuarter,4)-1 &amp;amp; ' Q4' ,&lt;/P&gt;&lt;P&gt;LEFT(CalendarYearQuarter,6)&amp;amp;(RIGHT(CalendarYearQuarter,1)-1)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vMaxQuarter=YEAR(MAX(DATE)) &amp;amp; ' Q' &amp;amp; MAX(CEIL(Month/3))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there are some sales amount for every quarter which is in a chart&lt;/P&gt;&lt;P&gt;when i select on a particular quarter, it should display the current quarter name in one chart &amp;amp; previous quarter name in another chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e., for ex if i select Q2, one chart will have Q2 &amp;amp; other will have Q!.&lt;/P&gt;&lt;P&gt;for all the quarters except Q1, its working fine. if i click on Q1 2015, it should display 2014 Q4 as well. but it is not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please give some suggestions to make it out&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Mar 2015 16:05:52 GMT</pubDate>
    <dc:creator />
    <dc:date>2015-03-26T16:05:52Z</dc:date>
    <item>
      <title>calculation of previous qtr value</title>
      <link>https://community.qlik.com/t5/QlikView/calculation-of-previous-qtr-value/m-p/800723#M1020553</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi experts,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i have the list box for calendaryearquarter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.qlik.com/" style="max-width: 1200px; max-height: 900px;" /&gt;&lt;/P&gt;&lt;P&gt;also i have calendar years 2014, 2015&lt;/P&gt;&lt;P&gt;i have set variables for current quarter &amp;amp; previous quarters as below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vPreviousQtr= if(GetSelectedCount(CalendarYearQuarter)&amp;lt;&amp;gt;1,'' &amp;amp;if(RIGHT(CalendarYearQuarter,1)=1,LEFT(CalendarYearQuarter,4)-1 &amp;amp; ' Q4' ,&lt;/P&gt;&lt;P&gt;LEFT(CalendarYearQuarter,6)&amp;amp;(RIGHT(CalendarYearQuarter,1)-1)))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vMaxQuarter=YEAR(MAX(DATE)) &amp;amp; ' Q' &amp;amp; MAX(CEIL(Month/3))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;there are some sales amount for every quarter which is in a chart&lt;/P&gt;&lt;P&gt;when i select on a particular quarter, it should display the current quarter name in one chart &amp;amp; previous quarter name in another chart.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i.e., for ex if i select Q2, one chart will have Q2 &amp;amp; other will have Q!.&lt;/P&gt;&lt;P&gt;for all the quarters except Q1, its working fine. if i click on Q1 2015, it should display 2014 Q4 as well. but it is not.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please give some suggestions to make it out&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Mar 2015 16:05:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/calculation-of-previous-qtr-value/m-p/800723#M1020553</guid>
      <dc:creator />
      <dc:date>2015-03-26T16:05:52Z</dc:date>
    </item>
  </channel>
</rss>

