<?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: TOTAL expression not counting correctly in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/TOTAL-expression-not-counting-correctly/m-p/2427183#M1225421</link>
    <description>&lt;P&gt;The 'total' should be honouring the scope of the chart.&amp;nbsp; My instinct is to check for a chart setting that could explain this, perhaps there is a 'dimension limit' in the chart?&amp;nbsp; Or one of the dimensions has a 'hide nulls'. Something like that.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ALso, try creating a text box with just the expression placed in the text chart.&amp;nbsp; If the value is 49055 you know its something specific about the pivot table chart.&lt;/P&gt;</description>
    <pubDate>Tue, 05 Mar 2024 14:08:29 GMT</pubDate>
    <dc:creator>JonnyPoole</dc:creator>
    <dc:date>2024-03-05T14:08:29Z</dc:date>
    <item>
      <title>TOTAL expression not counting correctly</title>
      <link>https://community.qlik.com/t5/QlikView/TOTAL-expression-not-counting-correctly/m-p/2427177#M1225420</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="paulinhok14_0-1709647133071.png" style="width: 778px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/161323i0EF5163C72012B24/image-dimensions/778x72?v=v2" width="778" height="72" role="button" title="paulinhok14_0-1709647133071.png" alt="paulinhok14_0-1709647133071.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:59:30 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/TOTAL-expression-not-counting-correctly/m-p/2427177#M1225420</guid>
      <dc:creator>paulinhok14</dc:creator>
      <dc:date>2024-03-05T13:59:30Z</dc:date>
    </item>
    <item>
      <title>Re: TOTAL expression not counting correctly</title>
      <link>https://community.qlik.com/t5/QlikView/TOTAL-expression-not-counting-correctly/m-p/2427183#M1225421</link>
      <description>&lt;P&gt;The 'total' should be honouring the scope of the chart.&amp;nbsp; My instinct is to check for a chart setting that could explain this, perhaps there is a 'dimension limit' in the chart?&amp;nbsp; Or one of the dimensions has a 'hide nulls'. Something like that.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;ALso, try creating a text box with just the expression placed in the text chart.&amp;nbsp; If the value is 49055 you know its something specific about the pivot table chart.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2024 14:08:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/TOTAL-expression-not-counting-correctly/m-p/2427183#M1225421</guid>
      <dc:creator>JonnyPoole</dc:creator>
      <dc:date>2024-03-05T14:08:29Z</dc:date>
    </item>
    <item>
      <title>Re: TOTAL expression not counting correctly</title>
      <link>https://community.qlik.com/t5/QlikView/TOTAL-expression-not-counting-correctly/m-p/2427255#M1225422</link>
      <description>&lt;P&gt;It looked that you are counting a key-field which often worked fine and personally I do it quite often. But remembering to quite old best practice guidance it shouldn't be done because not each side of the fact- and/or dimension-tables may have the same key-values (missing ones to all sides) and/or there might be any NULL's within them. If so the context of the view - object-dimensions, selections, advanced expressions&amp;nbsp; and so on - could have an impact to the results.&lt;/P&gt;
&lt;P&gt;Therefore you may try to enforce a certain view/relationship within the calculation, maybe by adding querying an table-unique field or something similar. More simple would be just to double the field within the target-table and then counting this.&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2024 15:41:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/TOTAL-expression-not-counting-correctly/m-p/2427255#M1225422</guid>
      <dc:creator>marcus_sommer</dc:creator>
      <dc:date>2024-03-05T15:41:05Z</dc:date>
    </item>
    <item>
      <title>Re: TOTAL expression not counting correctly</title>
      <link>https://community.qlik.com/t5/QlikView/TOTAL-expression-not-counting-correctly/m-p/2427332#M1225423</link>
      <description>&lt;P&gt;The text object try I've done it already. Shows 49030.&lt;/P&gt;
&lt;P&gt;Regarding your comments on charts settings, I've done it all to show nulls, zeros, etc, etc. Nothing solved...&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2024 17:51:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/TOTAL-expression-not-counting-correctly/m-p/2427332#M1225423</guid>
      <dc:creator>paulinhok14</dc:creator>
      <dc:date>2024-03-05T17:51:46Z</dc:date>
    </item>
    <item>
      <title>Re: TOTAL expression not counting correctly</title>
      <link>https://community.qlik.com/t5/QlikView/TOTAL-expression-not-counting-correctly/m-p/2427334#M1225424</link>
      <description>&lt;P&gt;Hey Marcus, thanks for your answer!&lt;BR /&gt;&lt;BR /&gt;Even not figuring out why exactly this happens, I was able to solve using your insight on key-field count.&lt;BR /&gt;&lt;BR /&gt;I've changed to:&lt;/P&gt;
&lt;P&gt;count ( {&amp;lt;[QAS Ellegible] = {1}&amp;gt;} [QAS Ellegible] )&lt;BR /&gt;&lt;BR /&gt;And seems to work right now. The total count column shows 49055.&lt;/P&gt;
&lt;P&gt;I thought that because I've created a script field [QAS Elligible] and put into my set analysis expression, I would not have problem with key-field count.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;So, even not knowing exactly why this happened, problem solved. Thank you!!!&lt;/P&gt;</description>
      <pubDate>Tue, 05 Mar 2024 17:54:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/TOTAL-expression-not-counting-correctly/m-p/2427334#M1225424</guid>
      <dc:creator>paulinhok14</dc:creator>
      <dc:date>2024-03-05T17:54:35Z</dc:date>
    </item>
  </channel>
</rss>

