<?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: Straight table - actual vs previous year in different rows? in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Straight-table-actual-vs-previous-year-in-different-rows/m-p/363916#M574083</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wouldn't use ValueLoop() for this, which creates a synthetic dimension, not connected to your data model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try using Year as dimension and then use a set expression to filter the data based on your selection:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=sum({&amp;lt;Year= {"&amp;gt;=$(=max(Year)-1)&amp;lt;=$(=max(Year))"}&amp;gt;} Sales)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to show the sum of Sales for the selected Year and the Year before.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 23 Jul 2012 20:34:09 GMT</pubDate>
    <dc:creator>swuehl</dc:creator>
    <dc:date>2012-07-23T20:34:09Z</dc:date>
    <item>
      <title>Straight table - actual vs previous year in different rows?</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-table-actual-vs-previous-year-in-different-rows/m-p/363915#M574082</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;Maybe it's an easy question - but I can't find a way after spending a few hours with some ideas &amp;amp; looking around.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've got a Year Dimension, restricted to only one selection. Now I want to have a straight table with:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" cellpadding="3" cellspacing="0" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 916px; height: 25px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="background-color: #6690bc; color: #333333; text-align: -moz-center; padding: 3px; font-family: arial,helvetica,sans-serif;"&gt;Year&lt;/TH&gt;&lt;TH style="background-color: #6690bc; color: #333333; text-align: -moz-center; padding: 3px; font-family: arial,helvetica,sans-serif;"&gt;&lt;P&gt;Sum(x)&lt;/P&gt;&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2012 (actual selection)&lt;/TD&gt;&lt;TD&gt;1000&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;2011 (actual selection-1)&lt;/TD&gt;&lt;TD&gt;800&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;BR /&gt;Displaying the actual selection and selection-1 is working fine by:&lt;/P&gt;&lt;P&gt;=ValueLoop((GetFieldSelections(Year))-1,(GetFieldSelections(Year)))&lt;/P&gt;&lt;P&gt;(as calculated dimension)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;But...how do I set the filter to the data refering to the row? The only function I know is above, tried it with a negative offset but seems like it's not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I guess it's a simple problem and it seems like they had an example in qlikview v9, but I don't have the qvw (just saw it on a screenshot).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I solve this small problem?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jul 2012 20:23:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-table-actual-vs-previous-year-in-different-rows/m-p/363915#M574082</guid>
      <dc:creator />
      <dc:date>2012-07-23T20:23:36Z</dc:date>
    </item>
    <item>
      <title>Re: Straight table - actual vs previous year in different rows?</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-table-actual-vs-previous-year-in-different-rows/m-p/363916#M574083</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I wouldn't use ValueLoop() for this, which creates a synthetic dimension, not connected to your data model.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Try using Year as dimension and then use a set expression to filter the data based on your selection:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;=sum({&amp;lt;Year= {"&amp;gt;=$(=max(Year)-1)&amp;lt;=$(=max(Year))"}&amp;gt;} Sales)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;to show the sum of Sales for the selected Year and the Year before.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Stefan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jul 2012 20:34:09 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-table-actual-vs-previous-year-in-different-rows/m-p/363916#M574083</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2012-07-23T20:34:09Z</dc:date>
    </item>
    <item>
      <title>Re: Straight table - actual vs previous year in different rows?</title>
      <link>https://community.qlik.com/t5/QlikView/Straight-table-actual-vs-previous-year-in-different-rows/m-p/363917#M574084</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;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Try like this,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ValueLoop($(=Max(Year)-1),$(=Max(Year))) used as dimension..&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope it helps&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 Jul 2012 20:35:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Straight-table-actual-vs-previous-year-in-different-rows/m-p/363917#M574084</guid>
      <dc:creator>MayilVahanan</dc:creator>
      <dc:date>2012-07-23T20:35:23Z</dc:date>
    </item>
  </channel>
</rss>

