<?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: Calculate CY QTD and Pevious QTD in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Calculate-CY-QTD-and-Pevious-QTD/m-p/2495626#M102557</link>
    <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/103918"&gt;@Aspiring_Developer&lt;/a&gt;&amp;nbsp; what do you mean by dynamic?&lt;/P&gt;</description>
    <pubDate>Mon, 02 Dec 2024 16:59:08 GMT</pubDate>
    <dc:creator>Kushal_Chawda</dc:creator>
    <dc:date>2024-12-02T16:59:08Z</dc:date>
    <item>
      <title>Calculate CY QTD and Pevious QTD</title>
      <link>https://community.qlik.com/t5/App-Development/Calculate-CY-QTD-and-Pevious-QTD/m-p/2495611#M102551</link>
      <description>&lt;P&gt;Hello All ,&lt;/P&gt;
&lt;P&gt;I have below data set and I want to calculate Current QTD and previous QTD in a single multi KPI . Here is my data set :-&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Aspiring_Developer_0-1733153617046.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/175098i88C16FF8D78C2056/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Aspiring_Developer_0-1733153617046.png" alt="Aspiring_Developer_0-1733153617046.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;In my Firt KPI , it should show the QTD for Oct 24 till Dec 24 and in second KPI , it should show the QTD for Aug-24 til sept 24 and it should be dynamic . I am trying below expression but can't do anything :-&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sum(&lt;BR /&gt;{&amp;lt; &lt;BR /&gt;transaction_dt = {"&amp;gt;=$(=Date(MakeDate(If(Month(Today()) &amp;gt;= 4, Year(Today()), Year(Today()) - 1), 4, 1), 'MM/DD/YYYY')) &amp;lt;=$(=Date(Today(), 'MM/DD/YYYY'))"},&lt;BR /&gt;&lt;BR /&gt;[Fiscal Quarter-Year] = {"$(If(Month(Today()) &amp;gt;= 4, Year(Today()), Year(Today()) - 1)) Q" &amp;amp; Ceil(Month(Today()) / 3)},&lt;BR /&gt;&lt;BR /&gt;[Fiscal Year] = {"$(If(Month(Today()) &amp;gt;= 4, Year(Today()), Year(Today()) - 1))"},&lt;BR /&gt;&lt;BR /&gt;[Month-Year] = {"&amp;gt;=$(=Date(MakeDate(If(Month(Today()) &amp;gt;= 4, Year(Today()), Year(Today()) - 1), (Ceil(Month(Today()) / 3) - 1) * 3 + 1, 1), 'YYYY-MM-DD')) &amp;lt;=$(=Date(Today(), 'YYYY-MM-DD'))"}&lt;BR /&gt;&amp;gt;} &lt;BR /&gt;diesel_litres&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Syntax error :-Error in set&amp;nbsp; modifier ad hoc element list : ','&amp;nbsp; or ')' expected .&lt;/P&gt;
&lt;P&gt;I am unable to rectify this&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/336"&gt;@Kushal_Chawda&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2024 15:38:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculate-CY-QTD-and-Pevious-QTD/m-p/2495611#M102551</guid>
      <dc:creator>Aspiring_Developer</dc:creator>
      <dc:date>2024-12-02T15:38:00Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate CY QTD and Pevious QTD</title>
      <link>https://community.qlik.com/t5/App-Development/Calculate-CY-QTD-and-Pevious-QTD/m-p/2495620#M102554</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/103918"&gt;@Aspiring_Developer&lt;/a&gt;&amp;nbsp; If your fiscal year starts with Month October try below with Month number 10. You can change the month number according to your fiscal year setup&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;QTD -

Sum(
{&amp;lt;
transaction_dt = {"&amp;gt;=$(=QuarterStart(today(),0,10))&amp;lt;=$(=QuarterEnd(today(),0,10))"}
&amp;gt;}
diesel_litres
)

PY QTD-
Sum(
{&amp;lt;
transaction_dt = {"&amp;gt;=$(=QuarterStart(addyears(today(),-1),0,10))&amp;lt;=$(=QuarterEnd(addyears(today(),-1),0,10))"}
&amp;gt;}
diesel_litres
)

&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2024 16:35:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculate-CY-QTD-and-Pevious-QTD/m-p/2495620#M102554</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2024-12-02T16:35:40Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate CY QTD and Pevious QTD</title>
      <link>https://community.qlik.com/t5/App-Development/Calculate-CY-QTD-and-Pevious-QTD/m-p/2495624#M102556</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/336"&gt;@Kushal_Chawda&lt;/a&gt;&amp;nbsp; Thank you but I want this to be dynamic .&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2024 16:51:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculate-CY-QTD-and-Pevious-QTD/m-p/2495624#M102556</guid>
      <dc:creator>Aspiring_Developer</dc:creator>
      <dc:date>2024-12-02T16:51:33Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate CY QTD and Pevious QTD</title>
      <link>https://community.qlik.com/t5/App-Development/Calculate-CY-QTD-and-Pevious-QTD/m-p/2495626#M102557</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/103918"&gt;@Aspiring_Developer&lt;/a&gt;&amp;nbsp; what do you mean by dynamic?&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2024 16:59:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculate-CY-QTD-and-Pevious-QTD/m-p/2495626#M102557</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2024-12-02T16:59:08Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate CY QTD and Pevious QTD</title>
      <link>https://community.qlik.com/t5/App-Development/Calculate-CY-QTD-and-Pevious-QTD/m-p/2495628#M102558</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/336"&gt;@Kushal_Chawda&lt;/a&gt;&amp;nbsp; &amp;nbsp;Here The range is set as 10 which is explicitly for the month of October . When the data for January till march 2025 will come , then this KPI should show the data for the latest QTD , i.e for january 2025 . Similarly , previous QTD would become the sum of values starting from Oct 2024 till Dec 2024&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2024 17:22:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculate-CY-QTD-and-Pevious-QTD/m-p/2495628#M102558</guid>
      <dc:creator>Aspiring_Developer</dc:creator>
      <dc:date>2024-12-02T17:22:46Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate CY QTD and Pevious QTD</title>
      <link>https://community.qlik.com/t5/App-Development/Calculate-CY-QTD-and-Pevious-QTD/m-p/2495636#M102561</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/103918"&gt;@Aspiring_Developer&lt;/a&gt;&amp;nbsp; My expression is already dynamic. What I meant is that if you're trying to calculate QTD for a fiscal year starting in October, the QuarterStart function requires a parameter to specify that QTD begins in October, not January. That's why the parameter '10' was used. In your case, the following should work&lt;/P&gt;
&lt;LI-CODE lang="javascript"&gt;QTD -

Sum(
{&amp;lt;
transaction_dt = {"&amp;gt;=$(=QuarterStart(today()))&amp;lt;=$(=QuarterEnd(today()))"}
&amp;gt;}
diesel_litres
)

PY QTD-
Sum(
{&amp;lt;
transaction_dt = {"&amp;gt;=$(=QuarterStart(today(),-1))&amp;lt;=$(=QuarterEnd(today(),-1))"}
&amp;gt;}
diesel_litres
)&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 02 Dec 2024 18:25:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculate-CY-QTD-and-Pevious-QTD/m-p/2495636#M102561</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2024-12-02T18:25:32Z</dc:date>
    </item>
  </channel>
</rss>

