<?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: Current and Previous Quarter calculations in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Current-and-Previous-Quarter-calculations/m-p/1395084#M613461</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Andrew,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That gives me a numeric value for each quarter, what is the logic then to get current quarter (or previous quarter). To get Current week i have used: let vCurrent_week = num(week(today()), '00');&lt;/P&gt;&lt;P&gt;To get current year week i have used: let vCurrent_yearweek = weekyear(today()) &amp;amp; num(week(today()), '00');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But i'm confused about current quarter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kieron &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 29 Aug 2017 13:21:30 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2017-08-29T13:21:30Z</dc:date>
    <item>
      <title>Current and Previous Quarter calculations</title>
      <link>https://community.qlik.com/t5/QlikView/Current-and-Previous-Quarter-calculations/m-p/1395082#M613457</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am creating a Quarter field with the following script:&lt;/P&gt;&lt;P&gt;'Q' &amp;amp; ceil(right([Acc_Calendar.Acc Period],2)/3) as Quarter&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;How do i then create a vCurrentQuarter and vPreviousQuarter ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Aug 2017 15:36:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-and-Previous-Quarter-calculations/m-p/1395082#M613457</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-28T15:36:35Z</dc:date>
    </item>
    <item>
      <title>Re: Current and Previous Quarter calculations</title>
      <link>https://community.qlik.com/t5/QlikView/Current-and-Previous-Quarter-calculations/m-p/1395083#M613460</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kieron,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Consider a separate numeric &lt;SPAN style="font-size: 13.3333px;"&gt;QuarterID field such as&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ceil(right([Acc_Calendar.Acc Period],2)/3)&amp;nbsp; as &lt;SPAN style="font-size: 13.3333px;"&gt;QuarterID &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;or you can try defining your quarter as a Dual:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Dual('Q' &amp;amp; ceil(right([Acc_Calendar.Acc Period],2)/3) , ceil(right([Acc_Calendar.Acc Period],2)/3) ) as Quarter&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andrew&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 28 Aug 2017 15:45:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-and-Previous-Quarter-calculations/m-p/1395083#M613460</guid>
      <dc:creator>effinty2112</dc:creator>
      <dc:date>2017-08-28T15:45:40Z</dc:date>
    </item>
    <item>
      <title>Re: Current and Previous Quarter calculations</title>
      <link>https://community.qlik.com/t5/QlikView/Current-and-Previous-Quarter-calculations/m-p/1395084#M613461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Andrew,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;That gives me a numeric value for each quarter, what is the logic then to get current quarter (or previous quarter). To get Current week i have used: let vCurrent_week = num(week(today()), '00');&lt;/P&gt;&lt;P&gt;To get current year week i have used: let vCurrent_yearweek = weekyear(today()) &amp;amp; num(week(today()), '00');&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But i'm confused about current quarter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kieron &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Aug 2017 13:21:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-and-Previous-Quarter-calculations/m-p/1395084#M613461</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-29T13:21:30Z</dc:date>
    </item>
    <item>
      <title>Re: Current and Previous Quarter calculations</title>
      <link>https://community.qlik.com/t5/QlikView/Current-and-Previous-Quarter-calculations/m-p/1395085#M613462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Keiron,&lt;/P&gt;&lt;P&gt;In the UI &lt;EM&gt;$(=max(&lt;/EM&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;&lt;EM&gt;QuarterID))&lt;/EM&gt; will give the current QuarterID according to the selections and &lt;SPAN style="font-size: 13.3333px;"&gt;&lt;EM&gt;$(=-1+max(&lt;/EM&gt;&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;&lt;EM&gt;QuarterID))&lt;/EM&gt; will give the previous.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Cheers&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Andrew&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Aug 2017 13:27:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-and-Previous-Quarter-calculations/m-p/1395085#M613462</guid>
      <dc:creator>effinty2112</dc:creator>
      <dc:date>2017-08-29T13:27:38Z</dc:date>
    </item>
    <item>
      <title>Re: Current and Previous Quarter calculations</title>
      <link>https://community.qlik.com/t5/QlikView/Current-and-Previous-Quarter-calculations/m-p/1395086#M613463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try below one &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vCurrent_Quarter=&amp;nbsp;&amp;nbsp; Year={"$(=GetFieldSelections(Quarter))"}&lt;/P&gt;&lt;P&gt;vPrevious_Quarter = Year={"$(=GetFieldSelections(Quarter)-1)"}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;$(=vCurrent_Quarterr)&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;sum({&amp;lt;$(=vvPrevious_Quarter)&amp;gt;}Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Aug 2017 13:29:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-and-Previous-Quarter-calculations/m-p/1395086#M613463</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-29T13:29:09Z</dc:date>
    </item>
    <item>
      <title>Re: Current and Previous Quarter calculations</title>
      <link>https://community.qlik.com/t5/QlikView/Current-and-Previous-Quarter-calculations/m-p/1395087#M613464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You can try below one &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vCurrent_Quarter=&amp;nbsp;&amp;nbsp; Quarter={"$(=GetFieldSelections(Quarter))"}&lt;/P&gt;&lt;P&gt;vPrevious_Quarter = Quarter={"$(=GetFieldSelections(Quarter)-1)"}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sum({&amp;lt;$(=vCurrent_Quarterr)&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;sum({&amp;lt;$(=vvPrevious_Quarter)&amp;gt;}Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Aug 2017 13:29:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-and-Previous-Quarter-calculations/m-p/1395087#M613464</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-29T13:29:59Z</dc:date>
    </item>
    <item>
      <title>Re: Current and Previous Quarter calculations</title>
      <link>https://community.qlik.com/t5/QlikView/Current-and-Previous-Quarter-calculations/m-p/1395088#M613465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.qlik.com/qlik-users/252560"&gt;devendarlakkyreddy&lt;/A&gt;‌ where should i try create those? in the script editor or in my calculation ?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kieron&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Aug 2017 13:51:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-and-Previous-Quarter-calculations/m-p/1395088#M613465</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-29T13:51:08Z</dc:date>
    </item>
    <item>
      <title>Re: Current and Previous Quarter calculations</title>
      <link>https://community.qlik.com/t5/QlikView/Current-and-Previous-Quarter-calculations/m-p/1395089#M613466</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;by using Quarter field in the front end create a variable , then use calculation in the chart&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 29 Aug 2017 13:53:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Current-and-Previous-Quarter-calculations/m-p/1395089#M613466</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-08-29T13:53:43Z</dc:date>
    </item>
  </channel>
</rss>

