<?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 Staright table to show current year and previous year sales in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Staright-table-to-show-current-year-and-previous-year-sales/m-p/1054438#M932811</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;Is it possible to show sales for a year and sales for the previous year in a straight table without using above() function?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My data is like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Year, Sales&lt;/P&gt;&lt;P&gt;2011, 1000&lt;/P&gt;&lt;P&gt;2012, 2000&lt;/P&gt;&lt;P&gt;2013, 3000&lt;/P&gt;&lt;P&gt;2014, 4000&lt;/P&gt;&lt;P&gt;2015, 5000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I want the chart to look like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Year, Sales, Previous_Year&lt;/P&gt;&lt;P&gt;2011, 1000,&lt;/P&gt;&lt;P&gt;2012, 2000, 1000&lt;/P&gt;&lt;P&gt;2013, 3000, 2000&lt;/P&gt;&lt;P&gt;2014, 4000, 3000&lt;/P&gt;&lt;P&gt;2015, 5000, 4000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was able to achieve it using above() function but when filters are applied (like when only few years are selected, the first one is always missing Previous_Year value), the above() is not working as expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attaching a sample file. Any help would be greatly appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 29 Feb 2016 22:24:09 GMT</pubDate>
    <dc:creator />
    <dc:date>2016-02-29T22:24:09Z</dc:date>
    <item>
      <title>Staright table to show current year and previous year sales</title>
      <link>https://community.qlik.com/t5/QlikView/Staright-table-to-show-current-year-and-previous-year-sales/m-p/1054438#M932811</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;Is it possible to show sales for a year and sales for the previous year in a straight table without using above() function?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My data is like:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Year, Sales&lt;/P&gt;&lt;P&gt;2011, 1000&lt;/P&gt;&lt;P&gt;2012, 2000&lt;/P&gt;&lt;P&gt;2013, 3000&lt;/P&gt;&lt;P&gt;2014, 4000&lt;/P&gt;&lt;P&gt;2015, 5000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And I want the chart to look like&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Year, Sales, Previous_Year&lt;/P&gt;&lt;P&gt;2011, 1000,&lt;/P&gt;&lt;P&gt;2012, 2000, 1000&lt;/P&gt;&lt;P&gt;2013, 3000, 2000&lt;/P&gt;&lt;P&gt;2014, 4000, 3000&lt;/P&gt;&lt;P&gt;2015, 5000, 4000&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was able to achieve it using above() function but when filters are applied (like when only few years are selected, the first one is always missing Previous_Year value), the above() is not working as expected.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attaching a sample file. Any help would be greatly appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 29 Feb 2016 22:24:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Staright-table-to-show-current-year-and-previous-year-sales/m-p/1054438#M932811</guid>
      <dc:creator />
      <dc:date>2016-02-29T22:24:09Z</dc:date>
    </item>
    <item>
      <title>Re: Staright table to show current year and previous year sales</title>
      <link>https://community.qlik.com/t5/QlikView/Staright-table-to-show-current-year-and-previous-year-sales/m-p/1054439#M932812</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;If anyone is interested, I was able to achieve this with a bit of scripting code. Sample attached.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-- Malai !&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Mar 2016 00:22:10 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Staright-table-to-show-current-year-and-previous-year-sales/m-p/1054439#M932812</guid>
      <dc:creator />
      <dc:date>2016-03-01T00:22:10Z</dc:date>
    </item>
    <item>
      <title>Re: Staright table to show current year and previous year sales</title>
      <link>https://community.qlik.com/t5/QlikView/Staright-table-to-show-current-year-and-previous-year-sales/m-p/1054440#M932813</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know you found your solution, but just so you want the Above function solution, you can use this expression:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;If(Sum(Sales) &amp;gt; 0, Above(Sum({&amp;lt;Year&amp;gt;}Sales)))&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="116343" alt="Capture.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/116343_Capture.PNG" style="height: auto;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Mar 2016 00:35:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Staright-table-to-show-current-year-and-previous-year-sales/m-p/1054440#M932813</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-03-01T00:35:24Z</dc:date>
    </item>
    <item>
      <title>Re: Staright table to show current year and previous year sales</title>
      <link>https://community.qlik.com/t5/QlikView/Staright-table-to-show-current-year-and-previous-year-sales/m-p/1054441#M932814</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your expression works as expected. Thanks a lot! This is actually better than my solution and that made life easier for me &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Mar 2016 00:44:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Staright-table-to-show-current-year-and-previous-year-sales/m-p/1054441#M932814</guid>
      <dc:creator />
      <dc:date>2016-03-01T00:44:52Z</dc:date>
    </item>
  </channel>
</rss>

