<?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 TOTAL expression not counting correctly in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/TOTAL-expression-not-counting-correctly/m-p/2427165#M96241</link>
    <description>&lt;P&gt;Hello dears!&lt;BR /&gt;&lt;BR /&gt;I have an app in which I want to create a pie chart with relative classification, in %, for a specific field.&lt;/P&gt;
&lt;P&gt;My field called "_Essentiality" has binary classification (0/1) and I want to count my Key field (%CompoundKey) for each of these classifications, having percentage for each class, example:&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;_Essentiality&lt;/TD&gt;
&lt;TD width="50%"&gt;Relative Count&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;0&lt;/TD&gt;
&lt;TD width="50%"&gt;97,3%&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;1&lt;/TD&gt;
&lt;TD width="50%"&gt;2,7%&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But the problem is, when I try to use TOTAL expression in order to have my relative share, my TOTAL count doesn't match with the sum of Keys in each classification (see attached image):&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="qlik error.png" style="width: 748px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/161320i9AA3A28C34B082F9/image-size/large?v=v2&amp;amp;px=999" role="button" title="qlik error.png" alt="qlik error.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;As you can see, my count considering Dimension totals 49055 and my total count shows 49030, so when I try to create the A / B in order to have 0-100% sum, my "0" classification become, solely, more than 100%.&lt;/P&gt;
&lt;P&gt;I've also tried to use ALL expression, without success.&lt;/P&gt;
&lt;P&gt;Any ideas?&lt;/P&gt;</description>
    <pubDate>Tue, 05 Mar 2024 13:36:50 GMT</pubDate>
    <dc:creator>paulinhok14</dc:creator>
    <dc:date>2024-03-05T13:36:50Z</dc:date>
    <item>
      <title>TOTAL expression not counting correctly</title>
      <link>https://community.qlik.com/t5/App-Development/TOTAL-expression-not-counting-correctly/m-p/2427165#M96241</link>
      <description>&lt;P&gt;Hello dears!&lt;BR /&gt;&lt;BR /&gt;I have an app in which I want to create a pie chart with relative classification, in %, for a specific field.&lt;/P&gt;
&lt;P&gt;My field called "_Essentiality" has binary classification (0/1) and I want to count my Key field (%CompoundKey) for each of these classifications, having percentage for each class, example:&lt;/P&gt;
&lt;TABLE border="1" width="100%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;_Essentiality&lt;/TD&gt;
&lt;TD width="50%"&gt;Relative Count&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;0&lt;/TD&gt;
&lt;TD width="50%"&gt;97,3%&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="50%"&gt;1&lt;/TD&gt;
&lt;TD width="50%"&gt;2,7%&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;But the problem is, when I try to use TOTAL expression in order to have my relative share, my TOTAL count doesn't match with the sum of Keys in each classification (see attached image):&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="qlik error.png" style="width: 748px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/161320i9AA3A28C34B082F9/image-size/large?v=v2&amp;amp;px=999" role="button" title="qlik error.png" alt="qlik error.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;As you can see, my count considering Dimension totals 49055 and my total count shows 49030, so when I try to create the A / B in order to have 0-100% sum, my "0" classification become, solely, more than 100%.&lt;/P&gt;
&lt;P&gt;I've also tried to use ALL expression, without success.&lt;/P&gt;
&lt;P&gt;Any ideas?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2024 13:36:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/TOTAL-expression-not-counting-correctly/m-p/2427165#M96241</guid>
      <dc:creator>paulinhok14</dc:creator>
      <dc:date>2024-03-05T13:36:50Z</dc:date>
    </item>
    <item>
      <title>Re: TOTAL expression not counting correctly</title>
      <link>https://community.qlik.com/t5/App-Development/TOTAL-expression-not-counting-correctly/m-p/2428007#M96314</link>
      <description>&lt;P&gt;I am assuming that your field %CompoundKey is a record key.&lt;/P&gt;
&lt;P&gt;Whenever you are counting record keys - you always have to use Distinct.&lt;/P&gt;
&lt;P&gt;Give that a try and post results.&lt;/P&gt;
&lt;P&gt;hth&lt;/P&gt;
&lt;P&gt;-ws&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 06 Mar 2024 23:23:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/TOTAL-expression-not-counting-correctly/m-p/2428007#M96314</guid>
      <dc:creator>WaltShpuntoff</dc:creator>
      <dc:date>2024-03-06T23:23:48Z</dc:date>
    </item>
    <item>
      <title>Re: TOTAL expression not counting correctly</title>
      <link>https://community.qlik.com/t5/App-Development/TOTAL-expression-not-counting-correctly/m-p/2428108#M96329</link>
      <description>&lt;P&gt;&lt;A href="https://community.qlik.com/t5/QlikView-App-Dev/TOTAL-expression-not-counting-correctly/m-p/2427255#M1225422" target="_blank"&gt;Solved: Re: TOTAL expression not counting correctly - Qlik Community - 2427177&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 07 Mar 2024 08:15:47 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/TOTAL-expression-not-counting-correctly/m-p/2428108#M96329</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2024-03-07T08:15:47Z</dc:date>
    </item>
  </channel>
</rss>

