<?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: Add a difference column to a Pivot table in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Add-a-difference-column-to-a-Pivot-table/m-p/308024#M497390</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need 2 expressions in your case:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Remove the year as Dimension &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Add two Expressions, one for each year set the year with Set Analysis:&lt;/P&gt;&lt;P&gt;Sum ({$ &amp;lt;Year={$(=max(Year))}&amp;gt;} Amount)&lt;/P&gt;&lt;P&gt;Sum ({$ &amp;lt;Year={$(=max(Year)-1)}&amp;gt;} Amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and at last column(1)-column(2) or in other direction&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum ({$ &amp;lt;Year={$(=max(Year))}&amp;gt;} Amount) - Sum ({$ &amp;lt;Year={$(=max(Year)-1)}&amp;gt;} Amount) as third Expression&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Nov 2011 13:19:38 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-11-09T13:19:38Z</dc:date>
    <item>
      <title>Add a difference column to a Pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/Add-a-difference-column-to-a-Pivot-table/m-p/308023#M497388</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'm trying to add a difference column to a pivot table but I can't get it to work.&lt;/P&gt;&lt;P&gt;I already try'd the example in the following discussion: &lt;A _jive_internal="true" href="https://community.qlik.com/message/88356"&gt;http://community.qlik.com/message/88356&lt;/A&gt;&lt;/P&gt;&lt;P&gt;But I can't get it to work the way I want to. I need 3 columns: 2009, 2010 and a difference column.&lt;/P&gt;&lt;P&gt;I've added a simple version of the qvw file i'm using.&lt;/P&gt;&lt;P&gt;Can anyone help me?&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2011 12:13:14 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-a-difference-column-to-a-Pivot-table/m-p/308023#M497388</guid>
      <dc:creator>janwillem</dc:creator>
      <dc:date>2011-11-09T12:13:14Z</dc:date>
    </item>
    <item>
      <title>Re: Add a difference column to a Pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/Add-a-difference-column-to-a-Pivot-table/m-p/308024#M497390</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You need 2 expressions in your case:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Remove the year as Dimension &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Add two Expressions, one for each year set the year with Set Analysis:&lt;/P&gt;&lt;P&gt;Sum ({$ &amp;lt;Year={$(=max(Year))}&amp;gt;} Amount)&lt;/P&gt;&lt;P&gt;Sum ({$ &amp;lt;Year={$(=max(Year)-1)}&amp;gt;} Amount)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and at last column(1)-column(2) or in other direction&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sum ({$ &amp;lt;Year={$(=max(Year))}&amp;gt;} Amount) - Sum ({$ &amp;lt;Year={$(=max(Year)-1)}&amp;gt;} Amount) as third Expression&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2011 13:19:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-a-difference-column-to-a-Pivot-table/m-p/308024#M497390</guid>
      <dc:creator />
      <dc:date>2011-11-09T13:19:38Z</dc:date>
    </item>
    <item>
      <title>Re: Add a difference column to a Pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/Add-a-difference-column-to-a-Pivot-table/m-p/308025#M497392</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt; Thanks Thomas. I hoped there was an easier way but this works great.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Nov 2011 13:35:31 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-a-difference-column-to-a-Pivot-table/m-p/308025#M497392</guid>
      <dc:creator>janwillem</dc:creator>
      <dc:date>2011-11-09T13:35:31Z</dc:date>
    </item>
    <item>
      <title>Re: Add a difference column to a Pivot table</title>
      <link>https://community.qlik.com/t5/QlikView/Add-a-difference-column-to-a-Pivot-table/m-p/1688205#M497393</link>
      <description>&lt;P&gt;I have similar problem and I use your suggestion.&amp;nbsp; It does provide the difference but the&lt;/P&gt;&lt;P&gt;Sum ({$ &amp;lt;Year={$(=max(Year))}&amp;gt;} Amount) includes all data of Max Year.&amp;nbsp; May I know how I can sum only criteria set in my alternative state?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Mar 2020 15:31:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Add-a-difference-column-to-a-Pivot-table/m-p/1688205#M497393</guid>
      <dc:creator>43918084</dc:creator>
      <dc:date>2020-03-26T15:31:52Z</dc:date>
    </item>
  </channel>
</rss>

