<?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: Simple YTD in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Simple-YTD/m-p/1400060#M804284</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;First Load the data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLE:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;Product, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sales&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then Declare variable in Variable overview:&lt;/P&gt;&lt;P&gt;vMaxDate=Max(Date)&lt;/P&gt;&lt;P&gt;vMaxYear=Year(Max(Date))&lt;/P&gt;&lt;P&gt;vLastYear=Year(Max(Date))-1&lt;/P&gt;&lt;P&gt;vLYEndDate=Date(YearStart(max(Date))-1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then write in expression for This year:&lt;/P&gt;&lt;P&gt;SUM({&amp;lt;Year={$(vMaxYear)},Date={'&amp;lt;=$(vMaxDate)'}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Then write in expression for Last year:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;SUM({&amp;lt;Year={$(vLastYear)},Date={'&amp;lt;=$(vLYEndDate)'}&amp;gt;}Sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 16 Nov 2017 10:51:52 GMT</pubDate>
    <dc:creator>sumanta12</dc:creator>
    <dc:date>2017-11-16T10:51:52Z</dc:date>
    <item>
      <title>Simple YTD</title>
      <link>https://community.qlik.com/t5/QlikView/Simple-YTD/m-p/1400053#M804270</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;&lt;/P&gt;&lt;P&gt;Can anyone help me out to show the YTD&amp;nbsp;&amp;nbsp; sales with sample data&amp;nbsp; with 10-15 records?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how to achieve this?&amp;nbsp; can anyone give sample script and expressions to get.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Am new to Qlik &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simple-YTD/m-p/1400053#M804270</guid>
      <dc:creator>kicchu465</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Simple YTD</title>
      <link>https://community.qlik.com/t5/QlikView/Simple-YTD/m-p/1400054#M804272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;check below thread.&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-9162"&gt;Set Analysis for certain Point in Time&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Nov 2017 07:03:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simple-YTD/m-p/1400054#M804272</guid>
      <dc:creator>PrashantSangle</dc:creator>
      <dc:date>2017-11-16T07:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: Simple YTD</title>
      <link>https://community.qlik.com/t5/QlikView/Simple-YTD/m-p/1400055#M804273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks prashanth,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I checked all the threads but&amp;nbsp; am not usnderstand the things&amp;nbsp; ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;that's why I asked with sample 10 records data to achieve this.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Nov 2017 07:05:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simple-YTD/m-p/1400055#M804273</guid>
      <dc:creator>kicchu465</dc:creator>
      <dc:date>2017-11-16T07:05:16Z</dc:date>
    </item>
    <item>
      <title>Re: Simple YTD</title>
      <link>https://community.qlik.com/t5/QlikView/Simple-YTD/m-p/1400056#M804275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-6163"&gt;YTQ, QTD, MTD and WTD&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.qlik.com/docs/DOC-7045"&gt;Previous YTQ, QTD, MTD and WTD&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example - also there in first link and you can read requirement of text..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Nov 2017 07:06:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simple-YTD/m-p/1400056#M804275</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-11-16T07:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: Simple YTD</title>
      <link>https://community.qlik.com/t5/QlikView/Simple-YTD/m-p/1400057#M804277</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;here is the sample&amp;nbsp;&amp;nbsp; I need YTD for this year and last year aswell,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;how to achieve with this data&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Nov 2017 07:08:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simple-YTD/m-p/1400057#M804277</guid>
      <dc:creator>kicchu465</dc:creator>
      <dc:date>2017-11-16T07:08:23Z</dc:date>
    </item>
    <item>
      <title>Re: Simple YTD</title>
      <link>https://community.qlik.com/t5/QlikView/Simple-YTD/m-p/1400058#M804279</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try like this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;YTD&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Date = {"&amp;gt;$=(=YearStart(Max(Date),0,4))&amp;lt;=$(=Max(Date))"}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LYTD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=Sum({&amp;lt;Year=, Month=,&amp;nbsp;&amp;nbsp; Date={"&amp;gt;=$(=Num(YearStart(Max(Date),-1)))&amp;lt;=$(=AddYears(Max(Date), -1))"}&amp;gt;} Sales)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Nov 2017 07:26:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simple-YTD/m-p/1400058#M804279</guid>
      <dc:creator>prma7799</dc:creator>
      <dc:date>2017-11-16T07:26:38Z</dc:date>
    </item>
    <item>
      <title>Re: Simple YTD</title>
      <link>https://community.qlik.com/t5/QlikView/Simple-YTD/m-p/1400059#M804281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Check this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;By using the sample data, i have created a YTD Flag in script ,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_15108285912845286 jive_text_macro" jivemacro_uid="_15108285912845286"&gt;
&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Data:&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; *,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;year&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Num&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;MonthNum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;,&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Month&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;INLINE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;[&lt;BR /&gt; &lt;BR /&gt; Date, Value&lt;BR /&gt; 1/01/2016, &lt;BR /&gt; 1/02/2016, 6&lt;BR /&gt; 1/03/2016, 12&lt;BR /&gt; 1/04/2016, 18&lt;BR /&gt; 1/05/2016, 24&lt;BR /&gt; 1/06/2016, 30&lt;BR /&gt; 1/07/2016, 36&lt;BR /&gt; 1/08/2016, 42&lt;BR /&gt; 1/09/2016, 48&lt;BR /&gt; 1/10/2016, 54&lt;BR /&gt; 1/11/2016, 60&lt;BR /&gt; 1/12/2016, 66&lt;BR /&gt; 1/01/2017, 72&lt;BR /&gt; 1/02/2017, 78&lt;BR /&gt; 1/03/2017, 84&lt;BR /&gt; 1/04/2017, 90&lt;BR /&gt; 1/05/2017, 96&lt;BR /&gt; ]&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;//Generating YTD in script&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;AsOf:&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;DISTINCT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;AsOfDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;RESIDENT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; Data&lt;BR /&gt; ;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;LEFT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;JOIN&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; (AsOf)&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;AsOfDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #008000; font-size: 8pt;"&gt;//Renaming the field&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;RESIDENT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; AsOf&lt;BR /&gt; ;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;INNER&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;JOIN&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; (AsOf)&lt;BR /&gt; &lt;/SPAN&gt;&lt;STRONG style=": ; color: #0000ff; font-size: 8pt;"&gt;LOAD&lt;/STRONG&gt;&lt;SPAN style="font-size: 8pt;"&gt; *,1 &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;as&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;YTD&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;RESIDENT&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; AsOf&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;WHERE&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;year&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;AsOfDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) = &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;year&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;(&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;)&lt;BR /&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;AND&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;AsOfDate&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt; &amp;gt;= &lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; ;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You can use that flag in set-analyis with Max(Year) &amp;amp; you can display the data.&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_15108288053736210" jivemacro_uid="_15108288053736210"&gt;
&lt;P&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;YTD&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={1},&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Year&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={'$(=Max(Year))'}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Value&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;BR /&gt; or else, by direct passing the dates into set analysis,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="sql" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_15108288444735710 jive_text_macro" jivemacro_uid="_15108288444735710"&gt;
&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;&lt;SPAN style="color: #0000ff; font-size: 8pt;"&gt;Sum&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;({&amp;lt;&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Date&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;={&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;"&amp;gt;=$(=YearStart(Max(Date)))&amp;lt;=$(=Date(Max(Date)))"&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;}&amp;gt;}&lt;/SPAN&gt;&lt;SPAN style="color: #800000; font-size: 8pt;"&gt;Value&lt;/SPAN&gt;&lt;SPAN style="font-size: 8pt;"&gt;) &lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Hope this helps,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;PFA&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 8pt;"&gt;Hirish&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Nov 2017 10:41:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simple-YTD/m-p/1400059#M804281</guid>
      <dc:creator>HirisH_V7</dc:creator>
      <dc:date>2017-11-16T10:41:25Z</dc:date>
    </item>
    <item>
      <title>Re: Simple YTD</title>
      <link>https://community.qlik.com/t5/QlikView/Simple-YTD/m-p/1400060#M804284</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;First Load the data:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;TABLE:&lt;/P&gt;&lt;P&gt;LOAD &lt;/P&gt;&lt;P&gt;Product, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Year, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Month, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Date, &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sales&lt;/P&gt;&lt;P&gt;FROM&lt;/P&gt;&lt;P&gt;&lt;C&gt;&lt;/C&gt;&lt;/P&gt;&lt;P&gt;(ooxml, embedded labels, table is Sheet1);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then Declare variable in Variable overview:&lt;/P&gt;&lt;P&gt;vMaxDate=Max(Date)&lt;/P&gt;&lt;P&gt;vMaxYear=Year(Max(Date))&lt;/P&gt;&lt;P&gt;vLastYear=Year(Max(Date))-1&lt;/P&gt;&lt;P&gt;vLYEndDate=Date(YearStart(max(Date))-1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then write in expression for This year:&lt;/P&gt;&lt;P&gt;SUM({&amp;lt;Year={$(vMaxYear)},Date={'&amp;lt;=$(vMaxDate)'}&amp;gt;}Sales)&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Then write in expression for Last year:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;SUM({&amp;lt;Year={$(vLastYear)},Date={'&amp;lt;=$(vLYEndDate)'}&amp;gt;}Sales)&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Nov 2017 10:51:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Simple-YTD/m-p/1400060#M804284</guid>
      <dc:creator>sumanta12</dc:creator>
      <dc:date>2017-11-16T10:51:52Z</dc:date>
    </item>
  </channel>
</rss>

