<?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 YTD and MTD Expression in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/YTD-and-MTD-Expression/m-p/643402#M1085055</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to show YTD and MTD , value of sales. please help me in the expression&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 07 Jun 2014 07:27:24 GMT</pubDate>
    <dc:creator>abhaysingh</dc:creator>
    <dc:date>2014-06-07T07:27:24Z</dc:date>
    <item>
      <title>YTD and MTD Expression</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-and-MTD-Expression/m-p/643402#M1085055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I want to show YTD and MTD , value of sales. please help me in the expression&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Jun 2014 07:27:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-and-MTD-Expression/m-p/643402#M1085055</guid>
      <dc:creator>abhaysingh</dc:creator>
      <dc:date>2014-06-07T07:27:24Z</dc:date>
    </item>
    <item>
      <title>Re: YTD and MTD Expression</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-and-MTD-Expression/m-p/643403#M1085056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Abhay,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Its always better to use YTD &amp;amp; MTD in your master calendar.&lt;BR /&gt;In the expression level, you can use MonthStart() &amp;amp; YearStart() function in your expression.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;--Lalit&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Jun 2014 07:37:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-and-MTD-Expression/m-p/643403#M1085056</guid>
      <dc:creator />
      <dc:date>2014-06-07T07:37:39Z</dc:date>
    </item>
    <item>
      <title>Re: YTD and MTD Expression</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-and-MTD-Expression/m-p/643404#M1085057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For the expressions YTD and MTD you have a Datefield and then check the YTD and MTD expression with that&amp;nbsp; but need to check you have latest dates in the database then write expression like below explanation. Also take any date dimensions for the charts.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;YTD Expression&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;=Sum({$&amp;lt;Datefield = {'&amp;gt;$(=Max((YearStart(Today())))) &amp;lt;=$(=Max(Today()))'}&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum({$&amp;lt;Datefield = {'&amp;gt;$(=Max((YearStart(Datefield)))) &amp;lt;=$(=Max(Today()))'}&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;MTD Expression&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;=Sum({$&amp;lt;Datefield = {'&amp;gt;=$(=Max((MonthStart(Today())))) &amp;lt;=$(=Max(Today()))'}&amp;gt;} Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum({$&amp;lt;Datefield = {'&amp;gt;=$(=Max((MonthStart(Datefield)))) &amp;lt;=$(=Max(Today()))'}&amp;gt;} Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Jun 2014 07:44:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-and-MTD-Expression/m-p/643404#M1085057</guid>
      <dc:creator>its_anandrjs</dc:creator>
      <dc:date>2014-06-07T07:44:41Z</dc:date>
    </item>
    <item>
      <title>Re: YTD and MTD Expression</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-and-MTD-Expression/m-p/643405#M1085058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi lalit&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks for ur input but could u pls elaborate your ans with some example.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;abhay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Jun 2014 08:09:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-and-MTD-Expression/m-p/643405#M1085058</guid>
      <dc:creator>abhaysingh</dc:creator>
      <dc:date>2014-06-07T08:09:06Z</dc:date>
    </item>
    <item>
      <title>Re: YTD and MTD Expression</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-and-MTD-Expression/m-p/643406#M1085059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Rather than using Set Analysis, you can do the same by creating Flags in the script itself...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;===============&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let vCompareDate = Today();&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sales:&lt;/P&gt;&lt;P&gt;Load * Inline&lt;/P&gt;&lt;P&gt;[&lt;/P&gt;&lt;P&gt;&amp;nbsp; Date, Sales&lt;/P&gt;&lt;P&gt;&amp;nbsp; 01/01/2014, 100&lt;/P&gt;&lt;P&gt;&amp;nbsp; 01/02/2014, 120&lt;/P&gt;&lt;P&gt;&amp;nbsp; 01/03/2014, 1200&lt;/P&gt;&lt;P&gt;&amp;nbsp; 05/04/2014, 180&lt;/P&gt;&lt;P&gt;&amp;nbsp; 10/05/2014, 1000&lt;/P&gt;&lt;P&gt;&amp;nbsp; 01/06/2014, 150&lt;/P&gt;&lt;P&gt;&amp;nbsp; 05/06/2014, 1200&lt;/P&gt;&lt;P&gt;];&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Load &lt;/P&gt;&lt;P&gt;&amp;nbsp; Date, &lt;/P&gt;&lt;P&gt;&amp;nbsp; If(InMonthToDate(Date, '$(vCompareDate)',0),'MTD') as Flag&lt;/P&gt;&lt;P&gt;Resident Sales;&lt;/P&gt;&lt;P&gt;Concatenate&lt;/P&gt;&lt;P&gt;Load Date, &lt;/P&gt;&lt;P&gt;&amp;nbsp; If(InYearToDate(Date,'$(vCompareDate)',0),'YTD') as Flag&lt;/P&gt;&lt;P&gt;Resident Sales;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=====================&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now create a list box for Flag&lt;/P&gt;&lt;P&gt;and &lt;/P&gt;&lt;P&gt;use the same for you selection...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Or you can use something like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=SUM({&amp;lt;Flag = {'YTD'}&amp;gt;}Sales) &lt;/P&gt;&lt;P&gt;or&lt;/P&gt;&lt;P&gt;=SUM({&amp;lt;Flag = {'MTD'}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;REFERENCE : &lt;/STRONG&gt;&lt;/P&gt;&lt;H1 class="n fn" style="font-size: 22px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;Valerio Fatatis&lt;/STRONG&gt;&lt;/H1&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Jun 2014 08:14:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-and-MTD-Expression/m-p/643406#M1085059</guid>
      <dc:creator>MK_QSL</dc:creator>
      <dc:date>2014-06-07T08:14:30Z</dc:date>
    </item>
  </channel>
</rss>

