<?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: Prior Year...on the same row in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Prior-Year-on-the-same-row/m-p/64601#M603208</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The best way might be to use &lt;A href="https://community.qlik.com/qlik-blogpost/4531"&gt;The As-Of Table&lt;/A&gt; to handle this. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 22 Jun 2018 02:49:50 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2018-06-22T02:49:50Z</dc:date>
    <item>
      <title>Prior Year...on the same row</title>
      <link>https://community.qlik.com/t5/QlikView/Prior-Year-on-the-same-row/m-p/64596#M603203</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm trying to show in a straight table, how one year compares to the prior year.&amp;nbsp; And calculate growth in one line.&lt;/P&gt;&lt;P&gt;given the following example (Attached) here is what I'm trying to achieve&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="169" style="border: 1px solid #000000; width: 362px; height: 163px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Year&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Amount&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;P&gt;&lt;STRONG&gt;Prior Year Amount&amp;nbsp; &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;(Not working)&lt;/STRONG&gt;&lt;/P&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2015&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;100&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;95&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2016&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;150&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;100&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2017&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;165&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;150&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;2018&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;175&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;165&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I thought it would be simple enough to say... SUM({&amp;lt;[Year] = {'=([Year]-1)'}&amp;gt;} Amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example workbook attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am I missing?&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Randy&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Message was edited by: Randy Kluver&#xD;
&#xD;
Corrected my file... should have data for 2014,  but the chart would not show2014, except as the amount in Prior Year for 2015.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2018 17:55:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Prior-Year-on-the-same-row/m-p/64596#M603203</guid>
      <dc:creator>randy_kluver</dc:creator>
      <dc:date>2018-06-21T17:55:07Z</dc:date>
    </item>
    <item>
      <title>Re: Prior Year...on the same row</title>
      <link>https://community.qlik.com/t5/QlikView/Prior-Year-on-the-same-row/m-p/64597#M603204</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Above(Sum(VALUE))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2018 18:28:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Prior-Year-on-the-same-row/m-p/64597#M603204</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-06-21T18:28:24Z</dc:date>
    </item>
    <item>
      <title>Re: Prior Year...on the same row</title>
      <link>https://community.qlik.com/t5/QlikView/Prior-Year-on-the-same-row/m-p/64598#M603205</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Quick Update.... &lt;/P&gt;&lt;P&gt;in the Data... There would be data for 2014...&amp;nbsp; So the row for 2015 should have a Prior year value in it.&amp;nbsp;&amp;nbsp; (Sorry for not clarifying that earlier).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Should look like this:&lt;/P&gt;&lt;P&gt;DATA:&lt;/P&gt;&lt;P&gt;2014&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 95&lt;/P&gt;&lt;P&gt;2015&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 100&lt;/P&gt;&lt;P&gt;...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Chart... Will not Show 2014,&amp;nbsp; but still want to show the Prior Year in 2015&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Year&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Current Year&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Prior Year&lt;/P&gt;&lt;P&gt;2015&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 100&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 95&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2018 19:10:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Prior-Year-on-the-same-row/m-p/64598#M603205</guid>
      <dc:creator>randy_kluver</dc:creator>
      <dc:date>2018-06-21T19:10:25Z</dc:date>
    </item>
    <item>
      <title>Re: Prior Year...on the same row</title>
      <link>https://community.qlik.com/t5/QlikView/Prior-Year-on-the-same-row/m-p/64599#M603206</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1) Current Year&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Sum({&amp;lt;YEAR = {"&amp;gt;=2015"}&amp;gt;} VALUE)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2) Prior Year&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Above(Sum({&amp;lt;YEAR&amp;gt;}VALUE)) * Avg(1)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;IMG alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/205926_Capture.PNG" style="height: 273px; width: 620px;" /&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2018 19:14:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Prior-Year-on-the-same-row/m-p/64599#M603206</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-06-21T19:14:34Z</dc:date>
    </item>
    <item>
      <title>Re: Prior Year...on the same row</title>
      <link>https://community.qlik.com/t5/QlikView/Prior-Year-on-the-same-row/m-p/64600#M603207</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sunny,&lt;/P&gt;&lt;P&gt;Expanding on that that solution.&amp;nbsp; &lt;/P&gt;&lt;P&gt;I tested and verified that I can use the OFFSET in the ABOVE function to adapt it to fit for using Quarters.&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My next question is....&lt;/P&gt;&lt;P&gt;Is there a safeguard to make sure I'm comparing the right Years or Quarters? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Example:&lt;/P&gt;&lt;P&gt;Given Years 2014 - 2019....&amp;nbsp; a User excludes 2017.&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;Using ABOVE() would not compensate for that.&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; The solution noted would for 2018 show Prior Year = 2016; not 2017.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there a solution using Set Analysis that would ensure or calculate which Year value to&amp;nbsp; return?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Randy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 21 Jun 2018 20:48:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Prior-Year-on-the-same-row/m-p/64600#M603207</guid>
      <dc:creator>randy_kluver</dc:creator>
      <dc:date>2018-06-21T20:48:39Z</dc:date>
    </item>
    <item>
      <title>Re: Prior Year...on the same row</title>
      <link>https://community.qlik.com/t5/QlikView/Prior-Year-on-the-same-row/m-p/64601#M603208</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The best way might be to use &lt;A href="https://community.qlik.com/qlik-blogpost/4531"&gt;The As-Of Table&lt;/A&gt; to handle this. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 22 Jun 2018 02:49:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Prior-Year-on-the-same-row/m-p/64601#M603208</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2018-06-22T02:49:50Z</dc:date>
    </item>
    <item>
      <title>Re: Prior Year...on the same row</title>
      <link>https://community.qlik.com/t5/QlikView/Prior-Year-on-the-same-row/m-p/1663232#M603209</link>
      <description>&lt;P&gt;Hi Sunny,&lt;/P&gt;&lt;P&gt;Thanks for the solution much appreciated. I have modified your expression and used it, It's working when I inlcude just year wise like mentioned in the image below&lt;/P&gt;&lt;P&gt;Previous year data:- Above(Sum({&amp;lt;POLICY_UW_YEAR, PAYTYPE={'PREMIUM'}&amp;gt;}AMOUNT)) * Avg(1)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-center" image-alt="Renewal Report.PNG" style="width: 200px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/26445i955E0F717790E7ED/image-size/small?v=v2&amp;amp;px=200" role="button" title="Renewal Report.PNG" alt="Renewal Report.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;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TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;EMAIL&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;USER_NAME&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;CHANNEL_NAME&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;SOURCE_SYSTEM&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;</description>
      <pubDate>Tue, 07 Jan 2020 10:28:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Prior-Year-on-the-same-row/m-p/1663232#M603209</guid>
      <dc:creator>karthikoffi27se</dc:creator>
      <dc:date>2020-01-07T10:28:13Z</dc:date>
    </item>
  </channel>
</rss>

