<?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: QTD, MTD and YTD Issue in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/QTD-MTD-and-YTD-Issue/m-p/1702425#M725754</link>
    <description>&lt;P&gt;Try this for QTD and see if this works.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sum({&amp;lt;YIL, AY, CEYREK, FATURATARIHI, DateNum={"$(='&amp;gt;=' &amp;amp; Num(QuarterStart(Today(), -4)) &amp;amp; '&amp;lt;=' &amp;amp; Num(AddYears(Max(Today()), -1)))"}&amp;gt;} SATIRNETTUTARI)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 15 May 2020 13:12:15 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2020-05-15T13:12:15Z</dc:date>
    <item>
      <title>QTD, MTD and YTD Issue</title>
      <link>https://community.qlik.com/t5/QlikView/QTD-MTD-and-YTD-Issue/m-p/1702384#M725753</link>
      <description>&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;I am currently working on sales report and trying to add QTD, MTD and YTD to it. I got the expression below but sadly previous year value is 0. I've been trying to find what the issue is but couldn't. I checked my code with other topics but seems the same so I wanted to get your opinion.&lt;/P&gt;&lt;P&gt;QTD :&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Sum({&amp;lt;YIL={'$(vPriorYear)'}, AY=, CEYREK=, FATURATARIHI={'&amp;lt;=$(vPriorYearDate)'}, DateNum={"&amp;gt;=$(=Num(QuarterStart(Max(DateNum), -4)))&amp;lt;=$(=AddYear(Max(DateNum), -1))"}&amp;gt;} SATIRNETTUTARI)&lt;/LI-CODE&gt;&lt;P&gt;MTD:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="csharp"&gt;Sum({&amp;lt;YIL={'$(vPriorYear)'}, AY=, CEYREK=, FATURATARIHI={'&amp;lt;=$(vPriorYearDate)'},GUN={'&amp;lt;=$(vMaxDay)'}, DateNum={"&amp;gt;=$(=Num(MonthStart(Max(DateNum), -12)))&amp;lt;=$(=AddYears(Max(DateNum), -1))"}&amp;gt;} SATIRNETTUTARI)&lt;/LI-CODE&gt;&lt;P&gt;YTD:&amp;nbsp;&lt;/P&gt;&lt;LI-CODE lang="c"&gt;Sum({&amp;lt;YIL={'$(vPriorYear)'}, AY=, CEYREK=, FATURATARIHI={'&amp;lt;=$(vPriorYearDate)'}, DateNum={"&amp;gt;=$(=Num(YearStart(Max(DateNum), -1)))&amp;lt;=$(=AddYear(Max(DateNum), -1))"}&amp;gt;}SATIRNETTUTARI)&lt;/LI-CODE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Emir_Peker_1-1589543341882.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/33697i5443D3A6F4409BA6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Emir_Peker_1-1589543341882.png" alt="Emir_Peker_1-1589543341882.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks in advance,&lt;/P&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QTD-MTD-and-YTD-Issue/m-p/1702384#M725753</guid>
      <dc:creator>Emir_Peker</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: QTD, MTD and YTD Issue</title>
      <link>https://community.qlik.com/t5/QlikView/QTD-MTD-and-YTD-Issue/m-p/1702425#M725754</link>
      <description>&lt;P&gt;Try this for QTD and see if this works.&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;Sum({&amp;lt;YIL, AY, CEYREK, FATURATARIHI, DateNum={"$(='&amp;gt;=' &amp;amp; Num(QuarterStart(Today(), -4)) &amp;amp; '&amp;lt;=' &amp;amp; Num(AddYears(Max(Today()), -1)))"}&amp;gt;} SATIRNETTUTARI)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 13:12:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QTD-MTD-and-YTD-Issue/m-p/1702425#M725754</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-05-15T13:12:15Z</dc:date>
    </item>
    <item>
      <title>Re: QTD, MTD and YTD Issue</title>
      <link>https://community.qlik.com/t5/QlikView/QTD-MTD-and-YTD-Issue/m-p/1702440#M725755</link>
      <description>&lt;P&gt;Yes, it did work. I guess all I had to do was remove the vPriorYear. Do the same with others I guess?&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 13:42:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QTD-MTD-and-YTD-Issue/m-p/1702440#M725755</guid>
      <dc:creator>Emir_Peker</dc:creator>
      <dc:date>2020-05-15T13:42:13Z</dc:date>
    </item>
    <item>
      <title>Re: QTD, MTD and YTD Issue</title>
      <link>https://community.qlik.com/t5/QlikView/QTD-MTD-and-YTD-Issue/m-p/1702443#M725756</link>
      <description>&lt;P&gt;Also added a Num() function around AddYears (note the function is AddYear&lt;FONT color="#FF0000"&gt;&lt;STRONG&gt;s&lt;/STRONG&gt;&lt;/FONT&gt;&amp;nbsp;with a s, not AddYear). Finally, removed&amp;nbsp; {'&amp;lt;=$(vPriorYearDate)'}. Basically, DateNum drives your period selection needed&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 13:44:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QTD-MTD-and-YTD-Issue/m-p/1702443#M725756</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2020-05-15T13:44:56Z</dc:date>
    </item>
    <item>
      <title>Re: QTD, MTD and YTD Issue</title>
      <link>https://community.qlik.com/t5/QlikView/QTD-MTD-and-YTD-Issue/m-p/1702449#M725757</link>
      <description>&lt;P&gt;I see, thank you.&lt;BR /&gt;&lt;BR /&gt;If I don't add Num() function still work on MTD and YTD. So do I really need to add it?&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Sum({&amp;lt;YIL, AY, CEYREK, FATURATARIHI, GUN={'&amp;lt;=$(vMaxDay)'}, DateNum={"&amp;gt;=$(=Num(MonthStart(Max(DateNum), -12)))&amp;lt;=$(=AddYears(Max(DateNum), -1))"}&amp;gt;} SATIRNETTUTARI)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;Also after using your suggested code, my present QTD, MTD and YTD shows 0. Codes are below.&lt;/P&gt;&lt;P&gt;QTD:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Sum({&amp;lt;YIL, AY, CEYREK, FATURATARIHI, DateNum={"$(='&amp;gt;=' &amp;amp; Num(QuarterStart(Max(DateNum)) &amp;amp; '&amp;lt;=' &amp;amp; Num(AddYears(Max(DateNum)))"}&amp;gt;} SATIRNETTUTARI)&lt;/LI-CODE&gt;&lt;P&gt;MTD:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Sum({&amp;lt;YIL, AY, CEYREK, FATURATARIHI, DateNum={"&amp;gt;=$(=Num(MonthStart(Max(DateNum))))&amp;lt;=$(=Max(DateNum))"}&amp;gt;} SATIRNETTUTARI)&lt;/LI-CODE&gt;&lt;P&gt;YTD:&lt;/P&gt;&lt;LI-CODE lang="javascript"&gt;Sum({&amp;lt;YIL, AY, CEYREK, FATURATARIHI, DateNum={"&amp;gt;=$(=Num(YearStart(Max(DateNum))))&amp;lt;=$(=Max(DateNum))"}&amp;gt;} SATIRNETTUTARI)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 15 May 2020 13:57:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QTD-MTD-and-YTD-Issue/m-p/1702449#M725757</guid>
      <dc:creator>Emir_Peker</dc:creator>
      <dc:date>2020-05-15T13:57:06Z</dc:date>
    </item>
    <item>
      <title>Re: QTD, MTD and YTD Issue</title>
      <link>https://community.qlik.com/t5/QlikView/QTD-MTD-and-YTD-Issue/m-p/1709947#M725758</link>
      <description>&lt;P&gt;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/46628"&gt;@sunny_talwar&lt;/a&gt;&amp;nbsp;You have time to take one last look at this one for us?&amp;nbsp; Thanks in advance and sorry for the bother, but I figured you were likely the best one to follow-up given you know what you were thinking, and you know Set Analysis is not my best area! &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;BR /&gt;Brett&lt;/P&gt;</description>
      <pubDate>Wed, 10 Jun 2020 21:22:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/QTD-MTD-and-YTD-Issue/m-p/1709947#M725758</guid>
      <dc:creator>Brett_Bleess</dc:creator>
      <dc:date>2020-06-10T21:22:12Z</dc:date>
    </item>
  </channel>
</rss>

