<?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 calculation in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Previous-Quarter-calculation/m-p/1980711#M80933</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;don't wry, plz provide me data set files&lt;/P&gt;
&lt;P&gt;so, i will calculate accurate answer for you and tell me one thing you have created variables in front-end or back-end.&lt;/P&gt;
&lt;P&gt;Here are the sales figures which you want , right ?&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Current Quarter Sales&lt;/STRONG&gt;: 356&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Previous Quarter Sales&lt;/STRONG&gt;: 524&lt;/P&gt;</description>
    <pubDate>Wed, 14 Sep 2022 06:23:06 GMT</pubDate>
    <dc:creator>krishna_p</dc:creator>
    <dc:date>2022-09-14T06:23:06Z</dc:date>
    <item>
      <title>Previous Quarter calculation</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-Quarter-calculation/m-p/1978149#M80745</link>
      <description>&lt;P&gt;Hi everyone!&lt;/P&gt;
&lt;P&gt;I'm trying to calculate the change in two quarters, I think I'm getting close but not sure what else I am missing in my formula and hoping that someone can help. Basically, user will select a quarter and the KPI will show current value and what the change was from prior quarter.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Here are the sales figures:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Current Quarter Sales&lt;/STRONG&gt;: 356&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Previous Quarter Sales&lt;/STRONG&gt;: 524&lt;/P&gt;
&lt;P&gt;I created two variables to return the start dates, one for current quarter and another for previous quarter:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;vCurrentQuarter&lt;/STRONG&gt;:&amp;nbsp;date(min([Year Month]),'YYYY-MMM')&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;vPreviousQuarter&lt;/STRONG&gt;: date(addmonths(min([Year Month]),-3),'YYYY-MMM')&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Calculation for Previous quarter sales&lt;/STRONG&gt;:&amp;nbsp;sum(${&amp;lt;'$(vCurrentQuarter)' ={"$(vPreviousQuarter)"}&amp;gt;} Sales)&lt;/P&gt;
&lt;P&gt;The calculation keeps giving me current quarter sales. What am I missing? Thanks in advance!&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 13:56:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-Quarter-calculation/m-p/1978149#M80745</guid>
      <dc:creator>snancyiv</dc:creator>
      <dc:date>2022-09-07T13:56:50Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Quarter calculation</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-Quarter-calculation/m-p/1978193#M80748</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/184348"&gt;@snancyiv&lt;/a&gt;&amp;nbsp;Once you have a well-formatted date field, try these&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Current:&lt;/STRONG&gt; Sum({&amp;lt;[Date Field]={"&amp;gt;=$(=Quarterstart(today(1)))&amp;lt;=$(=Quarterend(today(1)))"}&amp;gt;}Sales)&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Previous:&lt;/STRONG&gt; Sum({&amp;lt;[Date Field]={"&amp;gt;=$(=Quarterstart(today(1),-1))&amp;lt;=$(=Quarterend(today(1),-1))"}&amp;gt;}Sales)&lt;/P&gt;</description>
      <pubDate>Wed, 07 Sep 2022 15:17:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-Quarter-calculation/m-p/1978193#M80748</guid>
      <dc:creator>BrunPierre</dc:creator>
      <dc:date>2022-09-07T15:17:11Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Quarter calculation</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-Quarter-calculation/m-p/1978834#M80795</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/16737"&gt;@BrunPierre&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;I'm still getting current quarter values. For more reference, the filter to to select quarters is based on the quarter start date, "QuarterStart" which is calculated field in the script as Quarterstart(Date).&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2022 15:38:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-Quarter-calculation/m-p/1978834#M80795</guid>
      <dc:creator>snancyiv</dc:creator>
      <dc:date>2022-09-08T15:38:06Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Quarter calculation</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-Quarter-calculation/m-p/1978959#M80801</link>
      <description>&lt;P&gt;Provide some samples of the data.&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2022 20:01:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-Quarter-calculation/m-p/1978959#M80801</guid>
      <dc:creator>BrunPierre</dc:creator>
      <dc:date>2022-09-08T20:01:50Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Quarter calculation</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-Quarter-calculation/m-p/1979275#M80838</link>
      <description>&lt;P&gt;Removed sensitive info from the original. Please filter "YearQuarter" on 2022-Q4 when you open it to see my example.&lt;/P&gt;</description>
      <pubDate>Fri, 09 Sep 2022 13:16:43 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-Quarter-calculation/m-p/1979275#M80838</guid>
      <dc:creator>snancyiv</dc:creator>
      <dc:date>2022-09-09T13:16:43Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Quarter calculation</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-Quarter-calculation/m-p/1979874#M80871</link>
      <description>&lt;P&gt;The association is on Date to Discharge Date. When you filter on 2022-Q4, it should be:&lt;/P&gt;
&lt;P&gt;Current Quarter TotalNumerCase: 107&lt;/P&gt;
&lt;P&gt;Previous Quarter TotalNumerCase: 162&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2022 13:45:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-Quarter-calculation/m-p/1979874#M80871</guid>
      <dc:creator>snancyiv</dc:creator>
      <dc:date>2022-09-12T13:45:03Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Quarter calculation</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-Quarter-calculation/m-p/1980129#M80889</link>
      <description>&lt;P&gt;Maybe this&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Current Quarter&lt;/STRONG&gt;: Sum({&amp;lt;DischargeDate={"&amp;gt;=$(=QuarterStart(Max(DischargeDate),-1))&amp;lt;=$(=AddMonths(Max(DischargeDate),-3))"}&amp;gt;}TotalNumerCase)&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Previous Quarter&lt;/STRONG&gt;:Sum({&amp;lt;DischargeDate={"&amp;gt;=$(=QuarterStart(Max(DischargeDate)))&amp;lt;=$(=AddMonths(Max(DischargeDate),0))"}&amp;gt;}TotalNumerCase)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="peter_brown_2-1663046745255.png" style="width: 1050px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/88956i56177573DBAF9916/image-dimensions/1050x73?v=v2" width="1050" height="73" role="button" title="peter_brown_2-1663046745255.png" alt="peter_brown_2-1663046745255.png" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 07:35:22 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-Quarter-calculation/m-p/1980129#M80889</guid>
      <dc:creator>BrunPierre</dc:creator>
      <dc:date>2022-09-13T07:35:22Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Quarter calculation</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-Quarter-calculation/m-p/1980172#M80892</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Current Quarter :&lt;/STRONG&gt;&amp;nbsp;sum({&amp;lt;[Date-DischargeDate]={"&amp;gt;=$(=QuarterStart(Max([Date-DischargeDate]))) &amp;lt;=$(=QuarterEnd(max([Date-DischargeDate])))"}&amp;gt;}TotalNumerCase)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="krishna_p_0-1663052981603.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/88960i76ADC75B4BC5A73C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="krishna_p_0-1663052981603.png" alt="krishna_p_0-1663052981603.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Previous Quarter :&amp;nbsp;&lt;/STRONG&gt;sum({&amp;lt;[Date-DischargeDate]={"&amp;gt;=$(=QuarterStart(Max([Date-DischargeDate]),-1)) &amp;lt;=$(=QuarterEnd(max([Date-DischargeDate]),-1))"}&amp;gt;}TotalNumerCase)&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="krishna_p_1-1663053103380.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/88961i4985C24C3C5114C0/image-size/medium?v=v2&amp;amp;px=400" role="button" title="krishna_p_1-1663053103380.png" alt="krishna_p_1-1663053103380.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Thanks,&lt;/P&gt;
&lt;P&gt;Krishna&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 07:14:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-Quarter-calculation/m-p/1980172#M80892</guid>
      <dc:creator>krishna_p</dc:creator>
      <dc:date>2022-09-13T07:14:13Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Quarter calculation</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-Quarter-calculation/m-p/1980370#M80902</link>
      <description>&lt;P&gt;I still get the same amount as current quarter for previous calculation. &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 12:39:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-Quarter-calculation/m-p/1980370#M80902</guid>
      <dc:creator>snancyiv</dc:creator>
      <dc:date>2022-09-13T12:39:04Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Quarter calculation</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-Quarter-calculation/m-p/1980374#M80904</link>
      <description>&lt;P&gt;Still getting the same amount as current quarter&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 12:42:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-Quarter-calculation/m-p/1980374#M80904</guid>
      <dc:creator>snancyiv</dc:creator>
      <dc:date>2022-09-13T12:42:33Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Quarter calculation</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-Quarter-calculation/m-p/1980711#M80933</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;don't wry, plz provide me data set files&lt;/P&gt;
&lt;P&gt;so, i will calculate accurate answer for you and tell me one thing you have created variables in front-end or back-end.&lt;/P&gt;
&lt;P&gt;Here are the sales figures which you want , right ?&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Current Quarter Sales&lt;/STRONG&gt;: 356&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Previous Quarter Sales&lt;/STRONG&gt;: 524&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 06:23:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-Quarter-calculation/m-p/1980711#M80933</guid>
      <dc:creator>krishna_p</dc:creator>
      <dc:date>2022-09-14T06:23:06Z</dc:date>
    </item>
    <item>
      <title>Re: Previous Quarter calculation</title>
      <link>https://community.qlik.com/t5/App-Development/Previous-Quarter-calculation/m-p/1980909#M80943</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;data sets attached.&amp;nbsp;The association is on Date to Discharge Date. No variables here. I do have a custom field for quarter:&lt;/P&gt;
&lt;P&gt;[Fiscal Year] &amp;amp;'-'&amp;amp;&lt;BR /&gt;IF([Fiscal Month]='1','Q1', &lt;BR /&gt;IF([Fiscal Month]='2','Q1',&lt;BR /&gt;IF([Fiscal Month]='3','Q1',&lt;BR /&gt;IF([Fiscal Month]='4','Q2',&lt;BR /&gt;IF([Fiscal Month]='5','Q2',&lt;BR /&gt;IF([Fiscal Month]='6','Q2',&lt;BR /&gt;IF([Fiscal Month]='7','Q3',&lt;BR /&gt;IF([Fiscal Month]='8','Q3',&lt;BR /&gt;IF([Fiscal Month]='9','Q3',&lt;BR /&gt;'Q4'))))))))) AS [YearQuarter]&lt;/P&gt;
&lt;P&gt;When you filter on 2022-Q4, it should be:&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Current Quarter TotalNumerCase&lt;/STRONG&gt;: 107&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Previous Quarter TotalNumerCase&lt;/STRONG&gt;: 162&lt;/P&gt;</description>
      <pubDate>Wed, 14 Sep 2022 12:31:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Previous-Quarter-calculation/m-p/1980909#M80943</guid>
      <dc:creator>snancyiv</dc:creator>
      <dc:date>2022-09-14T12:31:28Z</dc:date>
    </item>
  </channel>
</rss>

