<?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: Previous Quarter all months in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Previous-Quarter-all-months/m-p/57106#M766946</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/171708"&gt;stalwar1&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;I made it work but sadly I had to hard code the missing months which made my expression almost 20 lines.&lt;/P&gt;&lt;P&gt;there are only 2 sheets and not much data so I guess it should not impact the app load.&lt;/P&gt;&lt;P&gt;BUT, if you can give me an optimized way to write it, it would be great!&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 21 Jun 2018 14:38:50 GMT</pubDate>
    <dc:creator>MK9885</dc:creator>
    <dc:date>2018-06-21T14:38:50Z</dc:date>
    <item>
      <title>Previous Quarter all months</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Quarter-all-months/m-p/57101#M766941</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 requirement where if I select Year = 2017, Month = Dec, I should see Data for Year = 2017, Month = July, Aug &amp;amp; Sep&lt;/P&gt;&lt;P&gt;And if I select Month as Sep, I should see data for Jun&lt;/P&gt;&lt;P&gt;And if I select Month as Aug, I should see Apr &amp;amp; May&lt;/P&gt;&lt;P&gt;In short whatever month I select I should see data starting from previous 3 months to whatever months left in that quarter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I used &lt;/P&gt;&lt;P&gt;sum({&amp;lt;Num_Month={'$(=Max(Num_Month)-3)'},Month&amp;nbsp; &amp;gt; }Amount)&lt;/P&gt;&lt;P&gt;This gives me 3rd month of any month I select&lt;/P&gt;&lt;P&gt;and if I use sum({&amp;lt;Num_Month={'$(=Max(Num_Month)-3)'},Month,Quarter = p(Quarter)&amp;nbsp; &amp;gt; }Amount) I get 0&lt;/P&gt;&lt;P&gt;using p (Quarter) doesn;t help with Num_Month - 3...&lt;/P&gt;&lt;P&gt;Any suggestions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/171708" target="_blank"&gt;stalwar1&lt;/A&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/Previous-Quarter-all-months/m-p/57101#M766941</guid>
      <dc:creator>MK9885</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Quarter all months</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Quarter-all-months/m-p/57102#M766942</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When Dec is selected (Last Month of 4th Quarter), you want to see July, August, September. But, when Sep is selected (Last Month of 3rd Quarter), you want to see just June? What is the logic here?&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;And if I select Month as Sep, I should see data for Jun&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2018 01:11:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Quarter-all-months/m-p/57102#M766942</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-06-21T01:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Quarter all months</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Quarter-all-months/m-p/57103#M766943</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The logic is&lt;/P&gt;&lt;P&gt;If last month of any quarter is selected, I should see data for all the PRIOR months in that selected quarter &amp;amp; previous quarter.&lt;/P&gt;&lt;P&gt;Ex:&lt;/P&gt;&lt;P&gt;If Dec is selected, I should see Jul, Aug &amp;amp; Sep and Oct, Nov &amp;amp; Dec&lt;/P&gt;&lt;P&gt;But if I select Nov month I should see only Oct, Nov &amp;amp; from prior quarter I should see only Jul &amp;amp; Aug.&lt;/P&gt;&lt;P&gt;So if 3rd month is selected I should see all the prior months from selected Quarter and previous quarter...&lt;/P&gt;&lt;P&gt;if 2nd month is selected, I should see selected month and prior month in selected quarter &amp;amp; prior quarter&lt;/P&gt;&lt;P&gt;if 1st month is selected then I should see 1st month of selected quarter and 1st month of prior quarter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope I could explain it... I know it is quite stupid&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For one of the expressions I used&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;fabs(num(sum({ &amp;lt;&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;[ FLAG]={1},&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Num_Month = {&amp;nbsp; '$(=Max(Num_Month) -2)'} , Quarter= p(Quarter), Month &amp;gt;+&amp;lt;&lt;/P&gt;
&lt;P&gt;[ FLAG]={1},&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;
&lt;P&gt;Num_Month = {&amp;nbsp; '$(=Max(Num_Month) -1)'} , Quarter= p(Quarter), Month&lt;/P&gt;
&lt;P&gt;&amp;gt;+&amp;lt;&lt;/P&gt;
&lt;P&gt;[ FLAG]={1},&amp;nbsp;&amp;nbsp; Num_Month = {&amp;nbsp; '$(=Max(Num_Month)&amp;nbsp; )'} , Quarter= p(Quarter), Month&lt;/P&gt;
&lt;P&gt;&amp;gt;}Amount ),'#.##0;#.##0'))&lt;/P&gt;

&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;The above expressions works fine for selected quarter&lt;/P&gt;&lt;P&gt;But now I want to show same for previous quarter &amp;amp; also if Jan is selected, I should see Oct data from 2016 same way if Feb is selected I should see Oct &amp;amp; Nov from 2016 (which is done)&lt;/P&gt;&lt;P&gt;Everything is working fine but when I start selecting Feb, I Just see Num_Month-3 data, a single months data but not the prior months in that quarter.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2018 11:57:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Quarter-all-months/m-p/57103#M766943</guid>
      <dc:creator>MK9885</dc:creator>
      <dc:date>2018-06-21T11:57:08Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Quarter all months</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Quarter-all-months/m-p/57104#M766944</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Again, I understand what you mean... but what confusing me is this&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;&lt;EM&gt;"And if I select Month as Sep, I should see data for Jun"&lt;/EM&gt;&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do you expect to see only Jun when Sep is selected? or do you expect to see Apr, May, &amp;amp; Jun?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2018 12:07:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Quarter-all-months/m-p/57104#M766944</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-06-21T12:07:18Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Quarter all months</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Quarter-all-months/m-p/57105#M766945</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;sorry if I select Sep, I should see data for July, Aug &amp;amp; Sep in one Column &lt;STRONG&gt;(This is completed as I have given the expression above but you can correct me if I'm wrong.)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;and&lt;/P&gt;&lt;P&gt;I should see Apr, May &amp;amp; Jun data in another column&amp;nbsp; (&lt;STRONG&gt;Here I see only Jun data)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Plus for prior month quarter I've to hard code Jan, Feb &amp;amp; Mar to get previous year month quarter.. the actual expression is really complex and maybe not good&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Look below for original messed up expression, which works for only Jan, Feb &amp;amp; Mar for previous quarter month&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;TABLE border="1"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;
&lt;P&gt;=if(Month='Jan', &lt;/P&gt;
&lt;P&gt;sum({&amp;lt;Num_Month={'$(=Max(Num_Month)+9)'},Month,[ FLAG]={1},Year={'$(=Max(Year)-1)'}&amp;nbsp; &amp;gt; }Amount_$(vDisplayCurrency)_AC)&amp;nbsp; ,&lt;/P&gt;
&lt;P&gt;if(Month='Feb', &lt;/P&gt;
&lt;P&gt;sum({&amp;lt;Num_Month={'$(=Max(Num_Month)+9)'},Month, FLAG]={1},Year={'$(=Max(Year)-1)'}&amp;gt;+&amp;lt; Quarter=p(Quarter),Month,&lt;/P&gt;
&lt;P&gt;[ FLAG]={1},Year={'$(=Max(Year)-1)'}, &lt;/P&gt;
&lt;P&gt;[Quarter Number]={'$(=Max([Quarter Number])-1)'}&lt;/P&gt;
&lt;P&gt;&amp;gt;+&amp;lt;&lt;/P&gt;
&lt;P&gt;Num_Month={'$(=Max(Num_Month)+8)'},Month,[ FLAG]={1},Year={'$(=Max(Year)-1)'}&amp;gt;+&amp;lt; Quarter=p(Quarter),Month,&lt;/P&gt;
&lt;P&gt;[ FLAG]={1},Year={'$(=Max(Year)-1)'}, &lt;/P&gt;
&lt;P&gt;[Quarter Number]={'$(=Max([Quarter Number])-1)'}&amp;gt; }Amount ) ,&lt;/P&gt;
&lt;P&gt;if(Month='Mar', &lt;/P&gt;
&lt;P&gt;sum({&amp;lt;Num_Month={'$(=Max(Num_Month)+9)'},Month,[ FLAG]={1},Year={'$(=Max(Year)-1)'} &lt;/P&gt;
&lt;P&gt;&amp;gt;+&amp;lt;&lt;/P&gt;
&lt;P&gt;Num_Month={'$(=Max(Num_Month)+8)'},Month,[ FLAG]={1},Year={'$(=Max(Year)-1)'} &lt;/P&gt;
&lt;P&gt;&amp;gt;+&amp;lt;&lt;/P&gt;
&lt;P&gt;Num_Month={'$(=Max(Num_Month)+7)'},Month, FLAG]={1},Year={'$(=Max(Year)-1)'} &amp;gt; }Amount ) ,&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;sum({&amp;lt;Num_Month={'$(=Max(Num_Month)-3)'},Month,[ FLAG]={1}&amp;nbsp; &amp;gt; }Amount ))))) &lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2018 12:15:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Quarter-all-months/m-p/57105#M766945</guid>
      <dc:creator>MK9885</dc:creator>
      <dc:date>2018-06-21T12:15:43Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Quarter all months</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-Quarter-all-months/m-p/57106#M766946</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/qlik-users/171708"&gt;stalwar1&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;I made it work but sadly I had to hard code the missing months which made my expression almost 20 lines.&lt;/P&gt;&lt;P&gt;there are only 2 sheets and not much data so I guess it should not impact the app load.&lt;/P&gt;&lt;P&gt;BUT, if you can give me an optimized way to write it, it would be great!&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2018 14:38:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-Quarter-all-months/m-p/57106#M766946</guid>
      <dc:creator>MK9885</dc:creator>
      <dc:date>2018-06-21T14:38:50Z</dc:date>
    </item>
  </channel>
</rss>

