<?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: Last YTD calculation issues. in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Last-YTD-calculation-issues/m-p/924234#M319912</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you&amp;nbsp; have a master calendar that the last date is June 30/2015 the you could have 4 variables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vMaxYear = Year(Max(Date));&lt;/P&gt;&lt;P&gt;vMaxDate = Max(Date); //Should be June 30/2015&lt;/P&gt;&lt;P&gt;vPrevYear = Year(AddYears(Max(Date), -1))&lt;/P&gt;&lt;P&gt;vMaxDatePrevYear = AddYears($(vMaxDate), -1) //Should calculate to June 30/2014&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then your formula should be something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LYTD = Sum({&amp;lt;Year={$(vPrevYear)}, Date={"&amp;lt;=$(vMaxDatePrevYear)"}&amp;gt;} Sales) //Accumulated figures up to June 30/2014&lt;/P&gt;&lt;P&gt;YTD = Sum({&amp;lt;Year={$(vMaxYear)}, Date={"&amp;lt;=$(vMaxDate)"}&amp;gt;} Sales) &lt;SPAN style="font-size: 13.3333330154419px;"&gt;//Accumulated figures up to June 30/2015&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 01 Aug 2015 02:01:46 GMT</pubDate>
    <dc:creator>maximiliano_vel</dc:creator>
    <dc:date>2015-08-01T02:01:46Z</dc:date>
    <item>
      <title>Last YTD calculation issues.</title>
      <link>https://community.qlik.com/t5/QlikView/Last-YTD-calculation-issues/m-p/924232#M319910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I currently have YTD &amp;amp; Last YTD working fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Last YTD - I have all details through the year.&amp;nbsp; However, on YTD - I am always a month behind.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For Example - today is July 31st.&amp;nbsp; But I don't have any numbers yet for the current year.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So&amp;nbsp; - my YTD is showing Jan1 - June 30th.&lt;/P&gt;&lt;P&gt;And Last YTD is showing Jan1 - July 31.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I get Last YTD to only calculate to the latest YTD Date I have?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;Amanda&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jul 2015 20:48:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-YTD-calculation-issues/m-p/924232#M319910</guid>
      <dc:creator />
      <dc:date>2015-07-31T20:48:09Z</dc:date>
    </item>
    <item>
      <title>Re: Last YTD calculation issues.</title>
      <link>https://community.qlik.com/t5/QlikView/Last-YTD-calculation-issues/m-p/924233#M319911</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;How are you calculating your Last YTD? Is it done in the script or on the front end using set analysis???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Jul 2015 21:27:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-YTD-calculation-issues/m-p/924233#M319911</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2015-07-31T21:27:19Z</dc:date>
    </item>
    <item>
      <title>Re: Last YTD calculation issues.</title>
      <link>https://community.qlik.com/t5/QlikView/Last-YTD-calculation-issues/m-p/924234#M319912</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you&amp;nbsp; have a master calendar that the last date is June 30/2015 the you could have 4 variables&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;vMaxYear = Year(Max(Date));&lt;/P&gt;&lt;P&gt;vMaxDate = Max(Date); //Should be June 30/2015&lt;/P&gt;&lt;P&gt;vPrevYear = Year(AddYears(Max(Date), -1))&lt;/P&gt;&lt;P&gt;vMaxDatePrevYear = AddYears($(vMaxDate), -1) //Should calculate to June 30/2014&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then your formula should be something like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;LYTD = Sum({&amp;lt;Year={$(vPrevYear)}, Date={"&amp;lt;=$(vMaxDatePrevYear)"}&amp;gt;} Sales) //Accumulated figures up to June 30/2014&lt;/P&gt;&lt;P&gt;YTD = Sum({&amp;lt;Year={$(vMaxYear)}, Date={"&amp;lt;=$(vMaxDate)"}&amp;gt;} Sales) &lt;SPAN style="font-size: 13.3333330154419px;"&gt;//Accumulated figures up to June 30/2015&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 01 Aug 2015 02:01:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-YTD-calculation-issues/m-p/924234#M319912</guid>
      <dc:creator>maximiliano_vel</dc:creator>
      <dc:date>2015-08-01T02:01:46Z</dc:date>
    </item>
    <item>
      <title>Re: Last YTD calculation issues.</title>
      <link>https://community.qlik.com/t5/QlikView/Last-YTD-calculation-issues/m-p/924235#M319913</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;I am on hold for a couple days...because now I need to put July data in there to test your variables/formula.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333330154419px;"&gt;I am assuming the variables go into the script?&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Aug 2015 14:12:42 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-YTD-calculation-issues/m-p/924235#M319913</guid>
      <dc:creator />
      <dc:date>2015-08-03T14:12:42Z</dc:date>
    </item>
    <item>
      <title>Re: Last YTD calculation issues.</title>
      <link>https://community.qlik.com/t5/QlikView/Last-YTD-calculation-issues/m-p/924236#M319914</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You have to create the variables in Settings-&amp;gt;Variable Overview... or (Ctrl + Alt + V)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Aug 2015 15:56:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-YTD-calculation-issues/m-p/924236#M319914</guid>
      <dc:creator>maximiliano_vel</dc:creator>
      <dc:date>2015-08-03T15:56:39Z</dc:date>
    </item>
    <item>
      <title>Re: Last YTD calculation issues.</title>
      <link>https://community.qlik.com/t5/QlikView/Last-YTD-calculation-issues/m-p/924237#M319915</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sorry this took so long.... But this isn't working.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Using the varibles and the formual above, I only get '-'&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Aug 2015 18:32:16 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-YTD-calculation-issues/m-p/924237#M319915</guid>
      <dc:creator />
      <dc:date>2015-08-21T18:32:16Z</dc:date>
    </item>
    <item>
      <title>Re: Last YTD calculation issues.</title>
      <link>https://community.qlik.com/t5/QlikView/Last-YTD-calculation-issues/m-p/924238#M319916</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Took me forever to get time to work on this project again.&amp;nbsp; But your answer above was the key!&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, 09 Dec 2015 19:09:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Last-YTD-calculation-issues/m-p/924238#M319916</guid>
      <dc:creator />
      <dc:date>2015-12-09T19:09:36Z</dc:date>
    </item>
  </channel>
</rss>

