<?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 Calculated column on Horizontal Pivot in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculated-column-on-Horizontal-Pivot/m-p/151855#M29513</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This one should be easy, I just can't find an example. I want to create a table like the following. Expressions on the vertical, one dimension (Year) on the horizontal. I want the Diff column to be the 2008 column - the 2007 column. I will have an arbitrary number of metrics (Budget, Sales) etc. I haven't been able to find an example that is a single table, but I beleve I've seen it done. Any ideas?&lt;/P&gt;&lt;P&gt;Year 2007 2008 Diff&lt;BR /&gt;Budget 800 2500 1700&lt;BR /&gt;Sales 1000 2000 1000&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Rob&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 15 May 2010 01:13:06 GMT</pubDate>
    <dc:creator>rwunderlich</dc:creator>
    <dc:date>2010-05-15T01:13:06Z</dc:date>
    <item>
      <title>Calculated column on Horizontal Pivot</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-column-on-Horizontal-Pivot/m-p/151855#M29513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;This one should be easy, I just can't find an example. I want to create a table like the following. Expressions on the vertical, one dimension (Year) on the horizontal. I want the Diff column to be the 2008 column - the 2007 column. I will have an arbitrary number of metrics (Budget, Sales) etc. I haven't been able to find an example that is a single table, but I beleve I've seen it done. Any ideas?&lt;/P&gt;&lt;P&gt;Year 2007 2008 Diff&lt;BR /&gt;Budget 800 2500 1700&lt;BR /&gt;Sales 1000 2000 1000&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;Rob&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 May 2010 01:13:06 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-column-on-Horizontal-Pivot/m-p/151855#M29513</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2010-05-15T01:13:06Z</dc:date>
    </item>
    <item>
      <title>Calculated column on Horizontal Pivot</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-column-on-Horizontal-Pivot/m-p/151856#M29514</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Rob,&lt;/P&gt;&lt;P&gt;We can use the total field to display the diff by using rowno()=0 to identify the total column and set analysis to compare the dates.&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/7840.Picture-2.png"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/11/7840.Picture-2.png" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Here is the expression I used for Budget...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE style="overflow-x: scroll;"&gt;&lt;PRE style="margin: 0px;"&gt;if(rowno()=0, sum({$ &amp;lt;Year={$(=max(Year))}&amp;gt;} Budget) - sum({$ &amp;lt;Year={$(=max(Year)-1)}&amp;gt;} Budget), sum(Budget))&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;&lt;/P&gt;&lt;P&gt;-Andy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 May 2010 16:02:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-column-on-Horizontal-Pivot/m-p/151856#M29514</guid>
      <dc:creator />
      <dc:date>2010-05-15T16:02:31Z</dc:date>
    </item>
    <item>
      <title>Calculated column on Horizontal Pivot</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-column-on-Horizontal-Pivot/m-p/151857#M29515</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I was going to suggest synthetic dimensions, but the idea to use Total for this purpose is simply brilliant!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 May 2010 20:53:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-column-on-Horizontal-Pivot/m-p/151857#M29515</guid>
      <dc:creator>Oleg_Troyansky</dc:creator>
      <dc:date>2010-05-15T20:53:24Z</dc:date>
    </item>
    <item>
      <title>Calculated column on Horizontal Pivot</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-column-on-Horizontal-Pivot/m-p/151858#M29516</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;(Copying Oleg &lt;IMG alt="Stick out tongue" src="http://community.qlik.com/emoticons/emotion-4.gif" /&gt;)&lt;BR /&gt;I was going to suggest using total, but didn't think of using rowno(). My typical "condition of choice" is dimensionality. I think it would be dimensionality2 in this case.&lt;BR /&gt;Now Rob has a lot of options...&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 May 2010 23:05:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-column-on-Horizontal-Pivot/m-p/151858#M29516</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2010-05-15T23:05:39Z</dc:date>
    </item>
    <item>
      <title>Calculated column on Horizontal Pivot</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-column-on-Horizontal-Pivot/m-p/151859#M29517</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Andy. That's a great solution.&lt;/P&gt;&lt;P&gt;-Rob&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 May 2010 23:41:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-column-on-Horizontal-Pivot/m-p/151859#M29517</guid>
      <dc:creator>rwunderlich</dc:creator>
      <dc:date>2010-05-17T23:41:05Z</dc:date>
    </item>
  </channel>
</rss>

