<?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: Sum Total with Exclusion in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Sum-Total-with-Exclusion/m-p/1772411#M717176</link>
    <description>&lt;P&gt;Correct your data model first.&lt;/P&gt;</description>
    <pubDate>Thu, 07 Jan 2021 06:15:51 GMT</pubDate>
    <dc:creator>tresB</dc:creator>
    <dc:date>2021-01-07T06:15:51Z</dc:date>
    <item>
      <title>Sum Total with Exclusion</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-Total-with-Exclusion/m-p/1772399#M717171</link>
      <description>&lt;P&gt;Dear all&lt;/P&gt;&lt;P&gt;Please help to advise how to compute Others (sum of Product D &amp;amp; E only) in the same Revenue Range with Product C and excludes Product A &amp;amp; B in the year of 2019.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you, Tracy&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2021 04:00:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-Total-with-Exclusion/m-p/1772399#M717171</guid>
      <dc:creator>tracycrown</dc:creator>
      <dc:date>2021-01-07T04:00:53Z</dc:date>
    </item>
    <item>
      <title>Re: Sum Total with Exclusion</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-Total-with-Exclusion/m-p/1772401#M717172</link>
      <description>&lt;P&gt;Your sample seems giving right result (when one revenue is selected). However, you could try using simpler expressions like:&lt;/P&gt;&lt;P&gt;Exp 1 :&amp;nbsp; &lt;FONT face="courier new,courier"&gt;Sum(Data)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;Exp 2 :&amp;nbsp; &lt;FONT face="courier new,courier"&gt;Sum({&amp;lt;Product=e(Product)&amp;gt;} Data)&amp;nbsp;&lt;/FONT&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; // if 'others' means not-selected/not in-scope ones&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2021 05:27:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-Total-with-Exclusion/m-p/1772401#M717172</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2021-01-07T05:27:36Z</dc:date>
    </item>
    <item>
      <title>Re: Sum Total with Exclusion</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-Total-with-Exclusion/m-p/1772407#M717173</link>
      <description>&lt;P&gt;Dear Mr Tresesco&lt;/P&gt;&lt;P&gt;Thanks for your quick advice.&lt;/P&gt;&lt;P&gt;For Product C, I have changed to Exp 1 : sum(Data)&lt;/P&gt;&lt;P&gt;For Others, Exp 2 : sum({&amp;lt;Product=e(Product)&amp;gt;} Data) is NOT CORRECT&lt;/P&gt;&lt;P&gt;because it covers Products D&amp;amp; E (within the same Revenue Range 3,000000-3,999999) and Products A &amp;amp; B (outside the Revenue Range).&amp;nbsp; Kindly advise how to exclude Products A &amp;amp; B.&lt;/P&gt;&lt;P&gt;&amp;nbsp;Many Thanks, Tracy&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2021 05:51:34 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-Total-with-Exclusion/m-p/1772407#M717173</guid>
      <dc:creator>tracycrown</dc:creator>
      <dc:date>2021-01-07T05:51:34Z</dc:date>
    </item>
    <item>
      <title>Re: Sum Total with Exclusion</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-Total-with-Exclusion/m-p/1772409#M717174</link>
      <description>&lt;P&gt;I don't see any association between your product and range dimensions in data model. With this your solution might not work as expected.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2021 06:03:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-Total-with-Exclusion/m-p/1772409#M717174</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2021-01-07T06:03:32Z</dc:date>
    </item>
    <item>
      <title>Re: Sum Total with Exclusion</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-Total-with-Exclusion/m-p/1772410#M717175</link>
      <description>&lt;P&gt;Dear Tresesco,&lt;/P&gt;&lt;P&gt;Okay, what is your best advice ?&lt;/P&gt;&lt;P&gt;Thanks, Tracy&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2021 06:11:39 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-Total-with-Exclusion/m-p/1772410#M717175</guid>
      <dc:creator>tracycrown</dc:creator>
      <dc:date>2021-01-07T06:11:39Z</dc:date>
    </item>
    <item>
      <title>Re: Sum Total with Exclusion</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-Total-with-Exclusion/m-p/1772411#M717176</link>
      <description>&lt;P&gt;Correct your data model first.&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2021 06:15:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-Total-with-Exclusion/m-p/1772411#M717176</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2021-01-07T06:15:51Z</dc:date>
    </item>
    <item>
      <title>Re: Sum Total with Exclusion</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-Total-with-Exclusion/m-p/1772427#M717177</link>
      <description>&lt;P&gt;Dear Tresesco&lt;/P&gt;&lt;P&gt;Sorry, not sure how to do it.&lt;/P&gt;&lt;P&gt;Tracy&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2021 07:55:37 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-Total-with-Exclusion/m-p/1772427#M717177</guid>
      <dc:creator>tracycrown</dc:creator>
      <dc:date>2021-01-07T07:55:37Z</dc:date>
    </item>
    <item>
      <title>Re: Sum Total with Exclusion</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-Total-with-Exclusion/m-p/1772573#M717178</link>
      <description>&lt;P&gt;from my understanding of the objective, you want the Revenue of Products with same range as C.&amp;nbsp; this will automatically exclude A and B as they are not in the same revenue range of C.&lt;BR /&gt;one way to do this is first determine the lower and upper range of the Revenue of C and save them in variables:&lt;BR /&gt;vLower:&amp;nbsp; =only({&amp;lt;Type={'Revenue'}, Product={'C'}&amp;gt;} if(Data&amp;gt;=Lower and Data&amp;lt;=Upper,Lower))&lt;BR /&gt;vUpper:&amp;nbsp; =only({&amp;lt;Type={'Revenue'}, Product={'C'}&amp;gt;} if(Data&amp;gt;=Lower and Data&amp;lt;=Upper,Upper))&lt;BR /&gt;&lt;BR /&gt;then in your chart, you can have the Product as Dimension and the following as the expression:&lt;BR /&gt;&lt;BR /&gt;=sum({&amp;lt;Type={'Revenue'},Product-={'C'}, Data={"&amp;gt;=$(vLower)&amp;lt;=$(vUpper)"}&amp;gt;}Data)&lt;BR /&gt;&lt;BR /&gt;this will result in products D and E.&amp;nbsp; if your business rule explicitly says exclude A and B:&lt;BR /&gt;&lt;BR /&gt;=sum({&amp;lt;Type={'Revenue'},Product-={'C','A','B'}, Data={"&amp;gt;=$(vLower)&amp;lt;=$(vUpper)"}&amp;gt;}Data)&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2021 15:18:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-Total-with-Exclusion/m-p/1772573#M717178</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2021-01-07T15:18:08Z</dc:date>
    </item>
    <item>
      <title>Re: Sum Total with Exclusion</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-Total-with-Exclusion/m-p/1772574#M717179</link>
      <description>&lt;P&gt;adding Product to the chart will validate the expression. if you only need the total revenue, just drop the Product dimension&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jan 2021 15:19:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-Total-with-Exclusion/m-p/1772574#M717179</guid>
      <dc:creator>edwin</dc:creator>
      <dc:date>2021-01-07T15:19:11Z</dc:date>
    </item>
    <item>
      <title>Re: Sum Total with Exclusion</title>
      <link>https://community.qlik.com/t5/QlikView/Sum-Total-with-Exclusion/m-p/1774449#M717180</link>
      <description>&lt;P&gt;Dear Edwin&lt;/P&gt;&lt;P&gt;Sorry for the late reply as I was sick and thank you so much for your advice and explanation.&lt;/P&gt;&lt;P&gt;Can you advise how to present the answer as per attached format :&lt;/P&gt;&lt;P&gt;Thank you in advance for your help, Tracy&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jan 2021 15:56:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Sum-Total-with-Exclusion/m-p/1774449#M717180</guid>
      <dc:creator>tracycrown</dc:creator>
      <dc:date>2021-01-14T15:56:07Z</dc:date>
    </item>
  </channel>
</rss>

