<?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 year MTD in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Previous-year-MTD/m-p/695615#M251414</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;find below expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Previous Year MTD&lt;/P&gt;&lt;P&gt;num(Sum({&amp;lt;VISIT_DATE={'&amp;gt;=$(=MonthStart(MakeDate(Year(VISIT_DATE)-1,Month(VISIT_DATE),Day(VISIT_DATE))))&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;lt;=$(=&lt;STRONG&gt;MonthEnd&lt;/STRONG&gt;(MakeDate(Year(VISIT_DATE)-1,Month(VISIT_DATE),Day(VISIT_DATE))))'}&amp;gt;}NET_AMOUNT)/vFactor,'##.##')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are Missing MonthEnd()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 03 Sep 2014 06:24:15 GMT</pubDate>
    <dc:creator>PrashantSangle</dc:creator>
    <dc:date>2014-09-03T06:24:15Z</dc:date>
    <item>
      <title>Previous year MTD</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-year-MTD/m-p/695612#M251411</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;I am using the following expression for calculating previous year MTD and previous year YTD&lt;/P&gt;&lt;P&gt;Previous MTD : num(Sum({&amp;lt;VISIT_DATE={'&amp;gt;=$(=MonthStart(MakeDate(Year(VISIT_DATE)-1,Month(VISIT_DATE),Day(VISIT_DATE))))&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;lt;=$(=MakeDate(Year(VISIT_DATE)-1,Month(VISIT_DATE),Day(VISIT_DATE)))'}&amp;gt;}NET_AMOUNT)/vFactor,'##.##')&lt;/P&gt;&lt;P&gt;Previous YTD: &lt;/P&gt;&lt;P&gt;=num(Sum({&amp;lt;VISIT_DATE={'&amp;gt;=$(=yearstart(MakeDate(Year(VISIT_DATE)-1,Month(VISIT_DATE),Day(VISIT_DATE))))&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;lt;=$(=MakeDate(Year(VISIT_DATE)-1,Month(VISIT_DATE),Day(VISIT_DATE)))'}&amp;gt;}NET_AMOUNT)/vFactor,'##.##')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Previous YTD expression is working fine.&lt;/P&gt;&lt;P&gt;But&amp;nbsp; for previous MTD expression I am getting Previous YTD value.&lt;/P&gt;&lt;P&gt;Can anyone tell me where I went wrong or Is there any other better way to calculate previous year MTD.&lt;/P&gt;&lt;P&gt;(note: I dont want to use master calendar)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 06:12:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-year-MTD/m-p/695612#M251411</guid>
      <dc:creator />
      <dc:date>2014-09-03T06:12:10Z</dc:date>
    </item>
    <item>
      <title>Re: Previous year MTD</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-year-MTD/m-p/695613#M251412</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;to get previous month you need to use addmonths(VISIT_DATE,-1) to get one month earlier&lt;/P&gt;&lt;P&gt;do you want previous month of same year&lt;/P&gt;&lt;P&gt;Previous MTD: num(Sum({&amp;lt;VISI_DATE={'&amp;gt;=$(=Monthstart(MakeDate(Year(VISIT_DATE),Month(addmonths(VISIT_DATE,-1),Day(VISIT_DATE)))&lt;/P&gt;&lt;P&gt;if previous year, previous month than year(Visit_Date)-1&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 06:18:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-year-MTD/m-p/695613#M251412</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-03T06:18:12Z</dc:date>
    </item>
    <item>
      <title>Re: Previous year MTD</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-year-MTD/m-p/695614#M251413</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for your reply&lt;/P&gt;&lt;P&gt;I want same month for previous year&lt;/P&gt;&lt;P&gt;Eg: Current MTD - Jun 2014&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Previous MTD - Jun 2013&lt;/P&gt;&lt;P&gt;same month for previous year&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 06:22:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-year-MTD/m-p/695614#M251413</guid>
      <dc:creator />
      <dc:date>2014-09-03T06:22:41Z</dc:date>
    </item>
    <item>
      <title>Re: Previous year MTD</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-year-MTD/m-p/695615#M251414</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;find below expression&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Previous Year MTD&lt;/P&gt;&lt;P&gt;num(Sum({&amp;lt;VISIT_DATE={'&amp;gt;=$(=MonthStart(MakeDate(Year(VISIT_DATE)-1,Month(VISIT_DATE),Day(VISIT_DATE))))&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;lt;=$(=&lt;STRONG&gt;MonthEnd&lt;/STRONG&gt;(MakeDate(Year(VISIT_DATE)-1,Month(VISIT_DATE),Day(VISIT_DATE))))'}&amp;gt;}NET_AMOUNT)/vFactor,'##.##')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are Missing MonthEnd()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 06:24:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-year-MTD/m-p/695615#M251414</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2014-09-03T06:24:15Z</dc:date>
    </item>
    <item>
      <title>Re: Previous year MTD</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-year-MTD/m-p/695616#M251415</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to calculate till the selected date only&lt;/P&gt;&lt;P&gt;For eg My date is 15-Aug-2014&lt;/P&gt;&lt;P&gt;I want to calculate for dates between 01-Aug-2013 to 15-Aug-2013&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 06:29:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-year-MTD/m-p/695616#M251415</guid>
      <dc:creator />
      <dc:date>2014-09-03T06:29:03Z</dc:date>
    </item>
    <item>
      <title>Re: Previous year MTD</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-year-MTD/m-p/695617#M251416</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;have a look at below post.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/docs/DOC-7045"&gt;http://community.qlik.com/docs/DOC-7045&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;ASHFAQ&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 06:34:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-year-MTD/m-p/695617#M251416</guid>
      <dc:creator>ashfaq_haseeb</dc:creator>
      <dc:date>2014-09-03T06:34:19Z</dc:date>
    </item>
    <item>
      <title>Re: Previous year MTD</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-year-MTD/m-p/695618#M251417</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;can you give examplem, you said that you get for Previous MTD the same result as for Previous YTD&lt;/P&gt;&lt;P&gt;according to your expressions Previous YTD would be result from 1.1.2013 to 3.9.2013 (if VIST_DATE = today) and Previous MTD would be 1.9.2013 to 3.9.2013&lt;/P&gt;&lt;P&gt;try the following:&lt;/P&gt;&lt;P&gt;put expression for Previous MTD&amp;nbsp; to an Textbox (=num(Sum....) and VISIT_DATE in a listbox, then select one VISIT_DATE and look what the textbox is showing&lt;/P&gt;&lt;P&gt;and if it is not the wanted result try to change the expressions. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 06:39:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-year-MTD/m-p/695618#M251417</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-09-03T06:39:13Z</dc:date>
    </item>
    <item>
      <title>Re: Previous year MTD</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-year-MTD/m-p/695619#M251418</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&lt;/P&gt;&lt;P&gt;Thanks all for your replies&lt;/P&gt;&lt;P&gt;My formula is working fine if I give the date by Inline script its not working when the date is loaded from qvd.&lt;/P&gt;&lt;P&gt;is it something bcoz of date format.&lt;/P&gt;&lt;P&gt;If so what can i do for that&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 07:22:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-year-MTD/m-p/695619#M251418</guid>
      <dc:creator />
      <dc:date>2014-09-03T07:22:59Z</dc:date>
    </item>
    <item>
      <title>Re: Previous year MTD</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-year-MTD/m-p/695620#M251419</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;BR /&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What type of format your date field contain in QVD.&lt;/P&gt;&lt;P&gt;Can You some sample date?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 07:58:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-year-MTD/m-p/695620#M251419</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2014-09-03T07:58:04Z</dc:date>
    </item>
    <item>
      <title>Re: Previous year MTD</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-year-MTD/m-p/695621#M251420</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Vidhya... use below for your requirements.... Let me know if still not working for you..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;MTD&lt;/P&gt;&lt;P&gt;=SUM({&amp;lt;Year = , Month = , TransactionDate = , TransactionDate = {'&amp;gt;=$(=MonthStart(Today()))&amp;lt;=$(=Today())'}&amp;gt;}Amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;YTD&lt;/P&gt;&lt;P&gt;=SUM({&amp;lt;Year = , Month = , TransactionDate = , CalYear = {'$(=Year(Today()))'}&amp;gt;}Amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PYMTD&lt;/P&gt;&lt;P&gt;=SUM({&amp;lt;Year = , Month = , TransactionDate = , TransactionDate = {'&amp;gt;=$(=MonthStart(Today(),-12))&amp;lt;=$(=AddYears(Today(),-1))'}&amp;gt;}Amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PYYTD&lt;/P&gt;&lt;P&gt;=SUM({&amp;lt;Year = , Month = , TransactionDate = , CalYear = {'$(=Year(Today())-1)'}&amp;gt;}Amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Change your field names accordingly....&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of MTD, YTD from Today(), if you want user to select a data and want to have result from YTD to selected date or MTD for that date, change Today() in all my above formulas with Max(TransactionDate)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 08:54:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-year-MTD/m-p/695621#M251420</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-09-03T08:54:36Z</dc:date>
    </item>
    <item>
      <title>Re: Previous year MTD</title>
      <link>https://community.qlik.com/t5/QlikView/Previous-year-MTD/m-p/695622#M251421</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manish,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you so much&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its working fine..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 07 Sep 2014 12:44:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Previous-year-MTD/m-p/695622#M251421</guid>
      <dc:creator />
      <dc:date>2014-09-07T12:44:15Z</dc:date>
    </item>
  </channel>
</rss>

