<?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 for previous year in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/YTD-for-previous-year/m-p/142873#M22264</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the year2date function has a yearoffset parameter for that purpose.&lt;/P&gt;&lt;P&gt;try the time chart assistant.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 30 Apr 2009 03:01:14 GMT</pubDate>
    <dc:creator>yblake</dc:creator>
    <dc:date>2009-04-30T03:01:14Z</dc:date>
    <item>
      <title>YTD for previous year</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-for-previous-year/m-p/142871#M22262</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;Hello!&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;I'm trying to create an expression that sums up all the units sold from the beginning of the previous year up to the selected month of that year (Example: the year 2009 and the month April is selected and I want to see the total number of units sold between Jan and April in 2008).&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;The code below gets me the result of the current year so it seems to be discarding the Year-part of the expression.&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;This code below gives me the result of the selected month of the previous year so it seems to discard the Month-part of the expression.&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;sum({&amp;lt;Year={"&amp;lt;=$(=max(Year)-1)"}&amp;gt;}{&amp;lt;Month={"&amp;lt;=$(=min(Month)) &amp;gt;$(=Month(addmonths(max(Month))))"}&amp;gt;} Units)&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;This code below gives me the result of the selected month of the previous year so it seems to discard the Month-part of the expression.&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;sum({&amp;lt;Month={"&amp;lt;=$(=min(Month))&amp;gt;$(=Month(addmonths(max(Month))))"}&amp;gt;}{$&amp;lt;Year={$(=max(Year)-1)}&amp;gt;}Units)&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;I would be very thankful if anyone could help me solve this problem since I have been trying to get this right for a while.&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;&lt;/P&gt;&lt;P style="line-height: normal; margin: 0cm 0cm 0pt; mso-layout-grid-align: none;"&gt;Kind regards Daniel&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Apr 2009 22:33:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-for-previous-year/m-p/142871#M22262</guid>
      <dc:creator />
      <dc:date>2009-04-29T22:33:36Z</dc:date>
    </item>
    <item>
      <title>YTD for previous year</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-for-previous-year/m-p/142872#M22263</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi Daniel,&lt;/P&gt;&lt;P&gt;hope below is what you're looking for:&lt;/P&gt;&lt;P&gt;YTD:&lt;/P&gt;&lt;P&gt;sum({&amp;lt;Year={$(=max(Year))}, Month={"&amp;lt;=$(=max(Month))"}&amp;gt;} Units)&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;for last year, -1 from the max(Year)&lt;/P&gt;&lt;P&gt;i do not have qlikview on the pc i'm using now so can't really verify the syntax. i'll repost tomorrow if it doesn't help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Apr 2009 23:07:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-for-previous-year/m-p/142872#M22263</guid>
      <dc:creator />
      <dc:date>2009-04-29T23:07:38Z</dc:date>
    </item>
    <item>
      <title>YTD for previous year</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-for-previous-year/m-p/142873#M22264</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;the year2date function has a yearoffset parameter for that purpose.&lt;/P&gt;&lt;P&gt;try the time chart assistant.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2009 03:01:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-for-previous-year/m-p/142873#M22264</guid>
      <dc:creator>yblake</dc:creator>
      <dc:date>2009-04-30T03:01:14Z</dc:date>
    </item>
    <item>
      <title>YTD for previous year</title>
      <link>https://community.qlik.com/t5/QlikView/YTD-for-previous-year/m-p/142874#M22265</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you both very much for your quick replies.&lt;/P&gt;&lt;P&gt;The solution kplow gave me worked exactly as I wanted it to do so once again, a big thanks.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind Regards Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Apr 2009 14:22:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/YTD-for-previous-year/m-p/142874#M22265</guid>
      <dc:creator />
      <dc:date>2009-04-30T14:22:54Z</dc:date>
    </item>
  </channel>
</rss>

