<?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: Problem with % YTD v PriorYTD in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Problem-with-YTD-v-PriorYTD/m-p/519695#M194185</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So you want to keep the flexibilty of changing column order. Then use expression directly like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=(NUM(SUM({&amp;lt;Year={'$(vMaxYear)'},Date={'&amp;lt;=$(vMaxDate)'}&amp;gt;}[line-amount]),'#,##0')-&lt;/P&gt;&lt;P&gt;NUM(SUM({&amp;lt;Year={'$(vPriorYear)'},Date={'&amp;lt;=$(vPriorYearDate)'}&amp;gt;}[line-amount]),'#,##0')&lt;/P&gt;&lt;P&gt;)/&lt;/P&gt;&lt;P&gt;NUM(SUM({&amp;lt;Year={'$(vPriorYear)'},Date={'&amp;lt;=$(vPriorYearDate)'}&amp;gt;}[line-amount]),'#,##0')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of column reference.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 03 Dec 2013 12:31:50 GMT</pubDate>
    <dc:creator>tresB</dc:creator>
    <dc:date>2013-12-03T12:31:50Z</dc:date>
    <item>
      <title>Problem with % YTD v PriorYTD</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-YTD-v-PriorYTD/m-p/519689#M194179</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;I have a problem when calculating % difference YTD v Prior YTD&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;here is what I have in Text Object, it works when the numbers are positive, but not when they are Negative&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2013-12-03_1055.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/49886_2013-12-03_1055.png" style="width: 620px; height: 61px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;See below table, in this table I am looking at this year v last year, it shows a % increase of 223% which to me is correct&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2013-12-03_1057.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/49887_2013-12-03_1057.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;However, If I select Year 2010 from my list box, I get the follow result&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2013-12-03_1059.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/49888_2013-12-03_1059.png" /&gt;&lt;/P&gt;&lt;P&gt;I am expecting to see a variance of -128% like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2013-12-03_1101.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/49889_2013-12-03_1101.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do I use an IF Statement in the Expression at the top of this post? If so, how do I need to correct it? any help would be greatly appreciated as my head is not with it at the moment&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Al&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Dec 2013 11:06:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-YTD-v-PriorYTD/m-p/519689#M194179</guid>
      <dc:creator>rustyfishbones</dc:creator>
      <dc:date>2013-12-03T11:06:09Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with % YTD v PriorYTD</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-YTD-v-PriorYTD/m-p/519690#M194180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;A _jive_internal="true" href="https://community.qlik.com/servlet/JiveServlet/showImage/2-430927-49886/2013-12-03_1055.png" style="font-weight: inherit; font-style: inherit; font-family: inherit; color: #3778c7; text-decoration: underline;"&gt;&lt;IMG alt="2013-12-03_1055.png" class="jive-image jiveImage" height="90" src="https://community.qlik.com/legacyfs/online/49893_2013-12-03_1055.png" style="border: 0px; font-weight: inherit; font-style: inherit; font-family: inherit;" width="915" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt; Try this way using min date and max date for both side using variable like this make variable&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;vStartDate =&amp;nbsp; =monthstart(Date(Min(Date)))&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;vEndDate =&amp;nbsp; = Date(Max(Date))&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;vPYStartDate = =Addmonths('$(vStartDate)',-12)&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;vPYEndDate =&amp;nbsp; =Addmonths('$(vEndDate)',-12)&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;So in expression side&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;write&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;(sum({&amp;lt;Year = {'$(vMaxYear)'},Date = {'&amp;gt;=$(vStartDate)&amp;lt;=$(vEndDate)'}&amp;gt;} line_amount)&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;-&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sum({&amp;lt;Year = {'$(vPriorYear)'},Date = {'&amp;gt;=$(vPYStartDate)&amp;lt;=$(vPYEndDate)'}&amp;gt;} line_amount))&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;/&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;sum({&amp;lt;Year = {'$(vPriorYear)'},Date = {'&amp;gt;=$(vPYStartDate)&amp;lt;=$(vPYEndDate)'}&amp;gt;} line_amount) *100&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Dec 2013 11:33:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-YTD-v-PriorYTD/m-p/519690#M194180</guid>
      <dc:creator>er_mohit</dc:creator>
      <dc:date>2013-12-03T11:33:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with % YTD v PriorYTD</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-YTD-v-PriorYTD/m-p/519691#M194181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Could you post your sample app that demonstrates the issue?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Dec 2013 11:43:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-YTD-v-PriorYTD/m-p/519691#M194181</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2013-12-03T11:43:30Z</dc:date>
    </item>
    <item>
      <title>Re: Re: Problem with % YTD v PriorYTD</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-YTD-v-PriorYTD/m-p/519692#M194182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi tresesco,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;PFA&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Dec 2013 11:50:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-YTD-v-PriorYTD/m-p/519692#M194182</guid>
      <dc:creator>rustyfishbones</dc:creator>
      <dc:date>2013-12-03T11:50:05Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with % YTD v PriorYTD</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-YTD-v-PriorYTD/m-p/519693#M194183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In&amp;nbsp; chart expression, I guess you have to correct the denominator by right column number (2 rather than 1), like:&lt;/P&gt;&lt;P&gt;=NUM((column(1) - column(2)) / column(&lt;STRONG&gt;2&lt;/STRONG&gt;),'0.00%')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Dec 2013 12:23:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-YTD-v-PriorYTD/m-p/519693#M194183</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2013-12-03T12:23:29Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with % YTD v PriorYTD</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-YTD-v-PriorYTD/m-p/519694#M194184</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;I tried that already, it will work if the COLUMN(1) Number is always the bigger number, but if the COLUMN(1) is less than COLUMN(2) I run into problems&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you promote the Expression in COLUMN(2) you will see what I mean&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Dec 2013 12:27:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-YTD-v-PriorYTD/m-p/519694#M194184</guid>
      <dc:creator>rustyfishbones</dc:creator>
      <dc:date>2013-12-03T12:27:25Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with % YTD v PriorYTD</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-YTD-v-PriorYTD/m-p/519695#M194185</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;So you want to keep the flexibilty of changing column order. Then use expression directly like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=(NUM(SUM({&amp;lt;Year={'$(vMaxYear)'},Date={'&amp;lt;=$(vMaxDate)'}&amp;gt;}[line-amount]),'#,##0')-&lt;/P&gt;&lt;P&gt;NUM(SUM({&amp;lt;Year={'$(vPriorYear)'},Date={'&amp;lt;=$(vPriorYearDate)'}&amp;gt;}[line-amount]),'#,##0')&lt;/P&gt;&lt;P&gt;)/&lt;/P&gt;&lt;P&gt;NUM(SUM({&amp;lt;Year={'$(vPriorYear)'},Date={'&amp;lt;=$(vPriorYearDate)'}&amp;gt;}[line-amount]),'#,##0')&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Instead of column reference.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Dec 2013 12:31:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-YTD-v-PriorYTD/m-p/519695#M194185</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2013-12-03T12:31:50Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with % YTD v PriorYTD</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-YTD-v-PriorYTD/m-p/519696#M194186</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, I tried that also.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I still have the issue where it works when the Max Year is greater then the Prior year, but if the max year is less than the previous year the result returned is incorrect.like below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="2013-12-03_1240.png" class="jive-image" src="https://community.qlik.com/legacyfs/online/49898_2013-12-03_1240.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I expect the % variance to be -128% for the above case, 4 Million drop in 2009 to 1.7 Million in 2010 is more than a decrease of 56%&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Dec 2013 12:43:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-YTD-v-PriorYTD/m-p/519696#M194186</guid>
      <dc:creator>rustyfishbones</dc:creator>
      <dc:date>2013-12-03T12:43:36Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with % YTD v PriorYTD</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-YTD-v-PriorYTD/m-p/519697#M194187</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=NUM((SUM({&amp;lt;Year={'$(vMaxYear)'},Date={'&amp;lt;=$(vMaxDate)'}&amp;gt;}[line-amount])-&lt;/P&gt;&lt;P&gt;SUM({&amp;lt;Year={'$(vPriorYear)'},Date={'&amp;lt;=$(vPriorYearDate)'}&amp;gt;}[line-amount])&lt;/P&gt;&lt;P&gt;)/&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;RangeMin&lt;/STRONG&gt;(SUM({&amp;lt;Year={'$(vPriorYear)'},Date={'&amp;lt;=$(vPriorYearDate)'}&amp;gt;}[line-amount]),SUM({&amp;lt;Year={'$(vMaxYear)'},Date={'&amp;lt;=$(vMaxDate)'}&amp;gt;}[line-amount])),'##.##')&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Dec 2013 12:55:28 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-YTD-v-PriorYTD/m-p/519697#M194187</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2013-12-03T12:55:28Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with % YTD v PriorYTD</title>
      <link>https://community.qlik.com/t5/QlikView/Problem-with-YTD-v-PriorYTD/m-p/519698#M194188</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks tresesco&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Dec 2013 13:39:21 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Problem-with-YTD-v-PriorYTD/m-p/519698#M194188</guid>
      <dc:creator>rustyfishbones</dc:creator>
      <dc:date>2013-12-03T13:39:21Z</dc:date>
    </item>
  </channel>
</rss>

