<?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 Subtotal wrong in Pivot Table when using IF in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Subtotal-wrong-in-Pivot-Table-when-using-IF/m-p/649084#M237511</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I add an if-statement to my expression the subtotal gets wrong... How can I correct this?&lt;/P&gt;&lt;P&gt;I have tried with distinct which I read somewhere that you could use, and also suppress zeros for dimensions, but it did not work, please advice!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;Lagernr = 'A01' or Lagernr = 'A02' or Lagernr = 'AR1' or Lagernr = 'AB1' or Lagernr = 'AW1' or Lagernr = 'A03', &lt;/P&gt;&lt;P&gt;Sum(distinct(Lagersaldo)), &lt;/P&gt;&lt;P&gt;Sum(distinct(Lagersaldo)) + sum(DISTINCT(Ordered))&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 02 Oct 2014 12:50:54 GMT</pubDate>
    <dc:creator>annabergendal</dc:creator>
    <dc:date>2014-10-02T12:50:54Z</dc:date>
    <item>
      <title>Subtotal wrong in Pivot Table when using IF</title>
      <link>https://community.qlik.com/t5/QlikView/Subtotal-wrong-in-Pivot-Table-when-using-IF/m-p/649084#M237511</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I add an if-statement to my expression the subtotal gets wrong... How can I correct this?&lt;/P&gt;&lt;P&gt;I have tried with distinct which I read somewhere that you could use, and also suppress zeros for dimensions, but it did not work, please advice!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If&lt;/P&gt;&lt;P&gt;(&lt;/P&gt;&lt;P&gt;Lagernr = 'A01' or Lagernr = 'A02' or Lagernr = 'AR1' or Lagernr = 'AB1' or Lagernr = 'AW1' or Lagernr = 'A03', &lt;/P&gt;&lt;P&gt;Sum(distinct(Lagersaldo)), &lt;/P&gt;&lt;P&gt;Sum(distinct(Lagersaldo)) + sum(DISTINCT(Ordered))&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Oct 2014 12:50:54 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subtotal-wrong-in-Pivot-Table-when-using-IF/m-p/649084#M237511</guid>
      <dc:creator>annabergendal</dc:creator>
      <dc:date>2014-10-02T12:50:54Z</dc:date>
    </item>
    <item>
      <title>Re: Subtotal wrong in Pivot Table when using IF</title>
      <link>https://community.qlik.com/t5/QlikView/Subtotal-wrong-in-Pivot-Table-when-using-IF/m-p/649085#M237512</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Try this (I cleaned your expression a little, and added sum(aggr()) around it):&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;sum(aggr(&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;if(&lt;/P&gt;&lt;P&gt;match(Lagernr,'A01','A02','AR1','AB1','AW1','A03'),&lt;/P&gt;&lt;P&gt;sum(Lagersaldo),&lt;/P&gt;&lt;P&gt;sum(Lagersaldo)+sum(Ordered)&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;,Lagernr))&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Oct 2014 14:04:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subtotal-wrong-in-Pivot-Table-when-using-IF/m-p/649085#M237512</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2014-10-02T14:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: Subtotal wrong in Pivot Table when using IF</title>
      <link>https://community.qlik.com/t5/QlikView/Subtotal-wrong-in-Pivot-Table-when-using-IF/m-p/649086#M237513</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks! Together with all the rest dimennsions in the aggr funktion it works... Great &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/happy.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 02 Oct 2014 14:32:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Subtotal-wrong-in-Pivot-Table-when-using-IF/m-p/649086#M237513</guid>
      <dc:creator>annabergendal</dc:creator>
      <dc:date>2014-10-02T14:32:00Z</dc:date>
    </item>
  </channel>
</rss>

