<?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 Percentages not adding up correctly in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Percentages-not-adding-up-correctly/m-p/225870#M78135</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I switch it to a piviot table here's what it looks like...&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/3515.Piviot.jpg"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/11/3515.Piviot.jpg" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 22 Feb 2011 16:16:11 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-02-22T16:16:11Z</dc:date>
    <item>
      <title>Percentages not adding up correctly</title>
      <link>https://community.qlik.com/t5/QlikView/Percentages-not-adding-up-correctly/m-p/225865#M78130</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm having issues getting my chart to produce the correct results. I'm sure it's my expression formula but I've tried everything I could find on the other posts and nothing is working.&lt;/P&gt;&lt;P&gt;I have stores that get inspected a couple of times each year. They are given a score. I need to show the scores grouped by quarter and then the percentage of stores in that group/quarter. The %'s aren't adding up to 100 for each quarter....&lt;/P&gt;&lt;P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-3639_sourceID:3639" /&gt;&lt;/P&gt;&lt;P&gt;Here is the current expression: Count(ACCOUNT)/Count(TOTAL &amp;lt;Quarter&amp;gt; ACCOUNT)&lt;/P&gt;&lt;P&gt;I get the same results without the &amp;lt;Quarter&amp;gt;, so I'm thinking something wrong...???&lt;/P&gt;&lt;P&gt;I have two dimensions, Score &amp;amp; Quarter. Score =If(TOTAL_SCORE &amp;gt; 0.899, '90% and above', if(TOTAL_SCORE &amp;lt; 0.9 AND TOTAL_SCORE &amp;gt; 0.799, '80% - 89.9%', if(TOTAL_SCORE &amp;lt; 0.8, '79.9 % and below'))) Quarter =QuarterName(Date)&lt;/P&gt;&lt;P&gt;Thanks in advance for any help!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Feb 2011 15:44:08 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Percentages-not-adding-up-correctly/m-p/225865#M78130</guid>
      <dc:creator />
      <dc:date>2011-02-22T15:44:08Z</dc:date>
    </item>
    <item>
      <title>AW:Percentages not adding up correctly</title>
      <link>https://community.qlik.com/t5/QlikView/Percentages-not-adding-up-correctly/m-p/225866#M78131</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sturev,&lt;/P&gt;&lt;P&gt;I am confused with the TOTAL statement as well each time I use it. Not sure if I understand your requirement correctly, but I believe using TOTAL &amp;lt;Score&amp;gt; should work out for you&lt;/P&gt;&lt;P&gt;cheers&lt;/P&gt;&lt;P&gt;Florian&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Feb 2011 15:46:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Percentages-not-adding-up-correctly/m-p/225866#M78131</guid>
      <dc:creator />
      <dc:date>2011-02-22T15:46:19Z</dc:date>
    </item>
    <item>
      <title>Percentages not adding up correctly</title>
      <link>https://community.qlik.com/t5/QlikView/Percentages-not-adding-up-correctly/m-p/225867#M78132</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;try the stacked bar chart for better checking/validation of the claim.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Feb 2011 15:48:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Percentages-not-adding-up-correctly/m-p/225867#M78132</guid>
      <dc:creator />
      <dc:date>2011-02-22T15:48:04Z</dc:date>
    </item>
    <item>
      <title>AW:Percentages not adding up correctly</title>
      <link>https://community.qlik.com/t5/QlikView/Percentages-not-adding-up-correctly/m-p/225868#M78133</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;When I change it to Score it says "No data to display", so that didn't work... but thanks for the suggestion! I'm learning too!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Feb 2011 15:55:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Percentages-not-adding-up-correctly/m-p/225868#M78133</guid>
      <dc:creator />
      <dc:date>2011-02-22T15:55:18Z</dc:date>
    </item>
    <item>
      <title>Percentages not adding up correctly</title>
      <link>https://community.qlik.com/t5/QlikView/Percentages-not-adding-up-correctly/m-p/225869#M78134</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have a simple count chart so I can double check the %'s...&lt;/P&gt;&lt;P&gt;=Count(ACCOUNT)&lt;/P&gt;&lt;P&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/11/1856.Count.jpg" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Feb 2011 15:58:36 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Percentages-not-adding-up-correctly/m-p/225869#M78134</guid>
      <dc:creator />
      <dc:date>2011-02-22T15:58:36Z</dc:date>
    </item>
    <item>
      <title>Percentages not adding up correctly</title>
      <link>https://community.qlik.com/t5/QlikView/Percentages-not-adding-up-correctly/m-p/225870#M78135</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If I switch it to a piviot table here's what it looks like...&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/3515.Piviot.jpg"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/11/3515.Piviot.jpg" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Feb 2011 16:16:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Percentages-not-adding-up-correctly/m-p/225870#M78135</guid>
      <dc:creator />
      <dc:date>2011-02-22T16:16:11Z</dc:date>
    </item>
    <item>
      <title>Percentages not adding up correctly</title>
      <link>https://community.qlik.com/t5/QlikView/Percentages-not-adding-up-correctly/m-p/225871#M78136</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After reading other posts, I'm wondering if the calculated dimensions have to be done in the load script???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 22 Feb 2011 19:17:12 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Percentages-not-adding-up-correctly/m-p/225871#M78136</guid>
      <dc:creator />
      <dc:date>2011-02-22T19:17:12Z</dc:date>
    </item>
    <item>
      <title>Percentages not adding up correctly</title>
      <link>https://community.qlik.com/t5/QlikView/Percentages-not-adding-up-correctly/m-p/225872#M78137</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Score is a calculated dimension? You might need to do that in the script, yes. I'm not sure an aggr() can refer to a field that doesn't exist. And if Quarter is a calculated dimension, that should definitely be in the script, even if I don't think you need that for this particular problem.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Feb 2011 00:35:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Percentages-not-adding-up-correctly/m-p/225872#M78137</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-02-23T00:35:41Z</dc:date>
    </item>
    <item>
      <title>Percentages not adding up correctly</title>
      <link>https://community.qlik.com/t5/QlikView/Percentages-not-adding-up-correctly/m-p/225873#M78138</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks John! Yes, both the Score and the Quarter are Dimensions... So my logic for the score is an if statement, would I just put that in the load script and put AS TotalScore? If so, would i just put field TotalScore in the dimension, or would that change things all around? Sorry, I'm a novice here... &lt;span class="lia-unicode-emoji" title=":disappointed_face:"&gt;😞&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You mention not needing quarter? I'm confused on that one as I need the chart to be by quarter???&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Feb 2011 01:39:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Percentages-not-adding-up-correctly/m-p/225873#M78138</guid>
      <dc:creator />
      <dc:date>2011-02-23T01:39:49Z</dc:date>
    </item>
    <item>
      <title>Percentages not adding up correctly</title>
      <link>https://community.qlik.com/t5/QlikView/Percentages-not-adding-up-correctly/m-p/225874#M78139</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Yes, you'd move the if() for total score into the script. I'd probably call it "Total Score Group" or something to distinguish it from your TOTAL_SCORE field. Then yes, you'd use "Total Score Group" as your first dimension instead of the if().&lt;/P&gt;&lt;P&gt;I didn't mean that you didn't need quarter at all. I just meant that solving your problem does not require you to move that calculation to the script, only the score calculation. But I do recommend that you calculate quarter in the script instead of the chart so that you only calculate it once instead of every time anyone looks at the chart. It might not matter if your data set is small, but if your data set is large it might speed the chart up a little.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Feb 2011 18:38:41 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Percentages-not-adding-up-correctly/m-p/225874#M78139</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-02-23T18:38:41Z</dc:date>
    </item>
    <item>
      <title>Percentages not adding up correctly</title>
      <link>https://community.qlik.com/t5/QlikView/Percentages-not-adding-up-correctly/m-p/225875#M78140</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks for the clarification John. I moved the formulas for both dimensions into the load script and made the adjustments on the chart, but now I'm seeing 100% across all scores/quarters...???&lt;/P&gt;&lt;P&gt;Count(RORID)/Count(TOTAL &amp;lt;RORQuarter&amp;gt; RORID)&lt;/P&gt;&lt;P&gt;&lt;A href="http://community.qlik.com/cfs-file.ashx/__key/CommunityServer.Discussions.Components.Files/11/4760.Untitled.jpg"&gt;&lt;IMG alt="" border="0" src="http://community.qlik.com/resized-image.ashx/__size/550x0/__key/CommunityServer.Discussions.Components.Files/11/4760.Untitled.jpg" /&gt;&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Feb 2011 20:49:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Percentages-not-adding-up-correctly/m-p/225875#M78140</guid>
      <dc:creator />
      <dc:date>2011-02-23T20:49:26Z</dc:date>
    </item>
    <item>
      <title>Percentages not adding up correctly</title>
      <link>https://community.qlik.com/t5/QlikView/Percentages-not-adding-up-correctly/m-p/225876#M78141</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;After checking further, it appears I have an issue with the way I put the QuarterName in the load script... Is this the proper way to do it? the RORData table is from a SQL View which has the WEEKEND date in it.&lt;/P&gt;&lt;P&gt;RORData:&lt;BR /&gt;SQL SELECT *&lt;BR /&gt;FROM $(DBHeader).vaRORData;&lt;BR /&gt;&lt;BR /&gt;Join (RORData) Load QuarterName(WEEKEND) AS RORQuarter resident RORData;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Feb 2011 20:57:15 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Percentages-not-adding-up-correctly/m-p/225876#M78141</guid>
      <dc:creator />
      <dc:date>2011-02-23T20:57:15Z</dc:date>
    </item>
    <item>
      <title>Percentages not adding up correctly</title>
      <link>https://community.qlik.com/t5/QlikView/Percentages-not-adding-up-correctly/m-p/225877#M78142</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I removed the QuarterName from the load script so I could still keep working on this problem, but nothing I've tried will get the TotalScoreGroup to add up to 100% for each quarter... seems like such a simple thing in Excel; not sure why I'm having so many issues on this chart.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Feb 2011 21:28:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Percentages-not-adding-up-correctly/m-p/225877#M78142</guid>
      <dc:creator />
      <dc:date>2011-02-23T21:28:25Z</dc:date>
    </item>
    <item>
      <title>Percentages not adding up correctly</title>
      <link>https://community.qlik.com/t5/QlikView/Percentages-not-adding-up-correctly/m-p/225878#M78143</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The attached example shows a total of 100% for each Quarter in the top chart, and a total of 100% for each ScoreRange in the bottom chart. Fields are established in script. I used a dual() function because I prefer numeric sorting for numeric-like data.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Feb 2011 21:52:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Percentages-not-adding-up-correctly/m-p/225878#M78143</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-02-23T21:52:48Z</dc:date>
    </item>
    <item>
      <title>Percentages not adding up correctly</title>
      <link>https://community.qlik.com/t5/QlikView/Percentages-not-adding-up-correctly/m-p/225879#M78144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;John I can't thank you enough for all your help! I used the dual function and it still didn't work. I then noticed I was using the Label name for the Quarter instead of the field name... as soon as I changed it to be the field they add up to 100% now. jeeze, what a nightmare...!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 23 Feb 2011 22:59:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Percentages-not-adding-up-correctly/m-p/225879#M78144</guid>
      <dc:creator />
      <dc:date>2011-02-23T22:59:18Z</dc:date>
    </item>
  </channel>
</rss>

