<?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 Compare class to average in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Compare-class-to-average/m-p/111808#M509678</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've created a Simple Bar Chart with a dimension using the class function:&lt;/P&gt;&lt;P&gt;=class(Aggr(Sum([Hours]), [Person ID]), 10)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression is the amount of people:&lt;/P&gt;&lt;P&gt;=count(DISTINCT [Person ID])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to colour the bar where the average of hours per person is found. I can find the average using the formula:&lt;/P&gt;&lt;P&gt;=Avg(Aggr(Sum([Hours]), [Person ID]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I colour the class bar that contains the average?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying the following formula, but it is not working:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; class(Aggr(Sum([Hours]), [Person ID]), 10)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; class(Avg(Aggr(Sum([Hours]), [Person ID]), 10))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Red(),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Blue()&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, in the image below, I would like to colour the 110-120 bar as Red (since it contains the average) and the others to remain Blue:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="214489" alt="Captura de tela de 2018-09-26 09:54:55.png" class="jive-image image-1" src="/legacyfs/online/214489_Captura de tela de 2018-09-26 09:54:55.png" style="height: 214px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 26 Sep 2018 12:58:18 GMT</pubDate>
    <dc:creator>isabelleica</dc:creator>
    <dc:date>2018-09-26T12:58:18Z</dc:date>
    <item>
      <title>Compare class to average</title>
      <link>https://community.qlik.com/t5/QlikView/Compare-class-to-average/m-p/111808#M509678</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've created a Simple Bar Chart with a dimension using the class function:&lt;/P&gt;&lt;P&gt;=class(Aggr(Sum([Hours]), [Person ID]), 10)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The expression is the amount of people:&lt;/P&gt;&lt;P&gt;=count(DISTINCT [Person ID])&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying to colour the bar where the average of hours per person is found. I can find the average using the formula:&lt;/P&gt;&lt;P&gt;=Avg(Aggr(Sum([Hours]), [Person ID]))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How can I colour the class bar that contains the average?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm trying the following formula, but it is not working:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if(&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; class(Aggr(Sum([Hours]), [Person ID]), 10)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; =&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; class(Avg(Aggr(Sum([Hours]), [Person ID]), 10))&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Red(),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Blue()&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;For example, in the image below, I would like to colour the 110-120 bar as Red (since it contains the average) and the others to remain Blue:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="214489" alt="Captura de tela de 2018-09-26 09:54:55.png" class="jive-image image-1" src="/legacyfs/online/214489_Captura de tela de 2018-09-26 09:54:55.png" style="height: 214px; width: 620px;" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 26 Sep 2018 12:58:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Compare-class-to-average/m-p/111808#M509678</guid>
      <dc:creator>isabelleica</dc:creator>
      <dc:date>2018-09-26T12:58:18Z</dc:date>
    </item>
  </channel>
</rss>

