<?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: Average of percentages in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Average-of-percentages/m-p/1416354#M427800</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to show it in a text box, yes, you can try using aggr() and 'total'. Please let know (and perhaps share a sample qvw) if that doesn't work .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Oct 2017 11:01:29 GMT</pubDate>
    <dc:creator>tresB</dc:creator>
    <dc:date>2017-10-09T11:01:29Z</dc:date>
    <item>
      <title>Average of percentages</title>
      <link>https://community.qlik.com/t5/QlikView/Average-of-percentages/m-p/1416353#M427799</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Morning,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;i'm trying to understand how to calculate the average of a expression of percentages:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" style="border: 1px solid rgb(0, 0, 0); width: 100%;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Training&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Passed&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;&lt;STRONG&gt;Failed&lt;/STRONG&gt;&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Passed %&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Fire Safety&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;200&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;48&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;81%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Data Protection&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;150&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;30&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;83%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;First Aid&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;100&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;50&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;66%&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Health &amp;amp; Safety&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;150&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;25&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;86%&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;below this pivot table i'd like to display the average % passed: &lt;STRONG&gt;Average % Passed Result = 79%&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Passed expression :&lt;/P&gt;&lt;P&gt;count({$&amp;lt;mandatory_or_optional = {'M'},passed = {'1'}&amp;gt;}1)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Failed expression:&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;count({$&amp;lt;mandatory_or_optional = {'M'},passed = {'0'}&amp;gt;}1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;Passed % expression:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;count({$&amp;lt;mandatory_or_optional = {'M'},passed = {'1'}&amp;gt;}1)/&lt;SPAN style="font-size: 13.3333px;"&gt;count({$&amp;lt;mandatory_or_optional = {'M'},passed = {'1','0'}&amp;gt;}1)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;to get the average % do i have to wrap the % expression with Aggr using the Total function? I'm a bit lost with this!&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px;"&gt;cheers guys&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Oct 2017 10:55:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-of-percentages/m-p/1416353#M427799</guid>
      <dc:creator>wonkymeister</dc:creator>
      <dc:date>2017-10-09T10:55:19Z</dc:date>
    </item>
    <item>
      <title>Re: Average of percentages</title>
      <link>https://community.qlik.com/t5/QlikView/Average-of-percentages/m-p/1416354#M427800</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;If you want to show it in a text box, yes, you can try using aggr() and 'total'. Please let know (and perhaps share a sample qvw) if that doesn't work .&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Oct 2017 11:01:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-of-percentages/m-p/1416354#M427800</guid>
      <dc:creator>tresB</dc:creator>
      <dc:date>2017-10-09T11:01:29Z</dc:date>
    </item>
    <item>
      <title>Re: Average of percentages</title>
      <link>https://community.qlik.com/t5/QlikView/Average-of-percentages/m-p/1416355#M427801</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;You should be able to use this and enable partial sum for your training dimension&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Avg(Aggr(&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;count({$&amp;lt;mandatory_or_optional = {'M'},passed = {'1'}&amp;gt;}1)/&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;STRONG&gt;count({$&amp;lt;mandatory_or_optional = {'M'},passed = {'1','0'}&amp;gt;}1), Training))&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Oct 2017 11:53:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-of-percentages/m-p/1416355#M427801</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2017-10-09T11:53:19Z</dc:date>
    </item>
    <item>
      <title>Re: Average of percentages</title>
      <link>https://community.qlik.com/t5/QlikView/Average-of-percentages/m-p/1416356#M427802</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Depends on how you define your average.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It may be enough to just use&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;=count({$&amp;lt;mandatory_or_optional = {'M'},passed = {'1'}&amp;gt;}1) &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;/ &lt;/SPAN&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;count({$&amp;lt;mandatory_or_optional = {'M'},passed = {'1','0'}&amp;gt;}1)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;i.e. the same expression for the grouped trainings and the total. This will consider the different number of exams in each training, while using the aggr() function, you ignore the different number of exams and just calculate the numeric average of the four percentages.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;edit: Guess you are already decided by defining the expected result of 79%...&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3d3d3d;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Oct 2017 12:01:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-of-percentages/m-p/1416356#M427802</guid>
      <dc:creator>swuehl</dc:creator>
      <dc:date>2017-10-09T12:01:23Z</dc:date>
    </item>
    <item>
      <title>Re: Average of percentages</title>
      <link>https://community.qlik.com/t5/QlikView/Average-of-percentages/m-p/1416357#M427803</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Sunny, perfect, works a treat, thank you!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Oct 2017 12:04:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Average-of-percentages/m-p/1416357#M427803</guid>
      <dc:creator>wonkymeister</dc:creator>
      <dc:date>2017-10-09T12:04:58Z</dc:date>
    </item>
  </channel>
</rss>

