<?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 YTD and QTD in Qlik using count in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Calculate-YTD-and-QTD-in-Qlik-using-count/m-p/2481882#M100879</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; try below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Count({&amp;lt;[Incident Occurred Date]={"&amp;lt;=$(=Date(Today()))"}&amp;gt;} ID)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;or&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Count(distinct {&amp;lt;[Incident Occurred Date]={"&amp;lt;=$(=Date(Today()))"}&amp;gt;} ID)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 16 Sep 2024 18:03:47 GMT</pubDate>
    <dc:creator>Kushal_Chawda</dc:creator>
    <dc:date>2024-09-16T18:03:47Z</dc:date>
    <item>
      <title>Calculate YTD and QTD in Qlik using count</title>
      <link>https://community.qlik.com/t5/App-Development/Calculate-YTD-and-QTD-in-Qlik-using-count/m-p/2481673#M100859</link>
      <description>&lt;P&gt;Hello All,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I have below data comprising details about incidents:-&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Aspiring_Developer_0-1726464359994.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/171670i141708BB01E2ADE9/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Aspiring_Developer_0-1726464359994.png" alt="Aspiring_Developer_0-1726464359994.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;This month year is created in the backend script from the field -Incident Occurred Date&lt;/P&gt;
&lt;P&gt;If I add date column in the above, my data would look like this :-&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Aspiring_Developer_1-1726464460544.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/171671i0DA99C5D87429E16/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Aspiring_Developer_1-1726464460544.png" alt="Aspiring_Developer_1-1726464460544.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;I want to achieve below :-&lt;/P&gt;
&lt;P&gt;1) Calculate YTD by taking the count(ID) . In my data set the max of date is 2025 as I have the forecast dates but in this I just have the data values till max month and my data is starting from April 2023 and I want to to show it till max (month ) as of today . I tried below expression but it did not worked :-&lt;/P&gt;
&lt;P&gt;Sum({&amp;lt;[Incident Occurred Date]={"&amp;lt;=$(=Date(Today(), 'MM/DD/YYYY'))"}&amp;gt;} [Count(ID)])&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This gives -Error in expression&amp;nbsp;&lt;/P&gt;
&lt;P&gt;2) I also want to show MTD, QoQ for the above in the KPI and and in the form of line chart&amp;nbsp;&lt;/P&gt;
&lt;P&gt;My expression should take the count of ID and not sum because when I take the sum, it gives me a lot of values:-&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Aspiring_Developer_0-1726464943368.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/171673i412C132A3150DE07/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Aspiring_Developer_0-1726464943368.png" alt="Aspiring_Developer_0-1726464943368.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;How can I achieve this?&lt;/P&gt;
&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;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2024 05:35:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculate-YTD-and-QTD-in-Qlik-using-count/m-p/2481673#M100859</guid>
      <dc:creator>Aspiring_Developer</dc:creator>
      <dc:date>2024-09-16T05:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate YTD and QTD in Qlik using count</title>
      <link>https://community.qlik.com/t5/App-Development/Calculate-YTD-and-QTD-in-Qlik-using-count/m-p/2481855#M100875</link>
      <description>&lt;P&gt;Hi&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;
&lt;P&gt;Try this:&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Sum({&amp;lt;&amp;nbsp;[Incident Occurred Date]={"&amp;lt;=$(=date(Today(1), 'MM/DD/YYYY'))"} &amp;gt;}&amp;nbsp; [Count(ID)])&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Cheers,&lt;/P&gt;
&lt;P&gt;++José&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2024 16:08:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculate-YTD-and-QTD-in-Qlik-using-count/m-p/2481855#M100875</guid>
      <dc:creator>diagonjope</dc:creator>
      <dc:date>2024-09-16T16:08:53Z</dc:date>
    </item>
    <item>
      <title>Re: Calculate YTD and QTD in Qlik using count</title>
      <link>https://community.qlik.com/t5/App-Development/Calculate-YTD-and-QTD-in-Qlik-using-count/m-p/2481882#M100879</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; try below&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Count({&amp;lt;[Incident Occurred Date]={"&amp;lt;=$(=Date(Today()))"}&amp;gt;} ID)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;or&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Count(distinct {&amp;lt;[Incident Occurred Date]={"&amp;lt;=$(=Date(Today()))"}&amp;gt;} ID)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 16 Sep 2024 18:03:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Calculate-YTD-and-QTD-in-Qlik-using-count/m-p/2481882#M100879</guid>
      <dc:creator>Kushal_Chawda</dc:creator>
      <dc:date>2024-09-16T18:03:47Z</dc:date>
    </item>
  </channel>
</rss>

