<?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: Using Max(Aggr(Count(..))) is not providing desired results in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Using-Max-Aggr-Count-is-not-providing-desired-results/m-p/1125005#M19565</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;=ColorMix1(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Count(Distinct [Issues])*100/$(AllIssues) / &lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;Max(&lt;SPAN style="color: #ff0000;"&gt;TOTAL&lt;/SPAN&gt; {$&amp;lt;Engine=&amp;gt;}Aggr(Count({$&amp;lt;Engine=&amp;gt;}Distinct [Issues])*100/$(AllIssues),Engine)),LightGreen(),LightRed())&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 11 May 2016 17:09:53 GMT</pubDate>
    <dc:creator>sunny_talwar</dc:creator>
    <dc:date>2016-05-11T17:09:53Z</dc:date>
    <item>
      <title>Using Max(Aggr(Count(..))) is not providing desired results</title>
      <link>https://community.qlik.com/t5/App-Development/Using-Max-Aggr-Count-is-not-providing-desired-results/m-p/1125004#M19564</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi everyone! I'm trying to do a ColorMix1 for a table, but I'm stumped.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a table in my app that looks something like this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;TABLE border="1" class="jiveBorder" height="124" style="border: 1px solid rgb(0, 0, 0); width: 196px; height: 103px;"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Engine&lt;/TH&gt;&lt;TH style="text-align: center; background-color: #6690bc; color: #ffffff; padding: 2px;" valign="middle"&gt;Issues Rate&lt;/TH&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Engine 3&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;&lt;P&gt;1.65&lt;/P&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Engine 1&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;1.01&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;Engine 2&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;0.73&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD style="padding: 2px;"&gt;...&lt;/TD&gt;&lt;TD style="padding: 2px;"&gt;...&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Where '% of Issues' is Count(Distinct [Issues])*100/$(AllIssues). So a pretty basic ratio (normalized by every 100 engines produced).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To use ColorMix1, I've figured out that the value has to be between 0 and 1...I can't figure out how to normalize these values such that Engine 3 becomes 1 for the ColorMix1 function.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Essentially, the math to get Engine 3 Issue Rate from 1.65 to 1.0 and scale the rest of the values accordingly is the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To get around this, I was trying to make the Aggr function work such that:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=ColorMix1(&lt;SPAN style="font-size: 13.3333px;"&gt;Count(Distinct [Issues])*100/$(AllIssues) / &lt;/SPAN&gt;Max({$&amp;lt;Engine=&amp;gt;}Aggr(Count({$&amp;lt;Engine=&amp;gt;}Distinct [Issues])*100/$(AllIssues),Engine)),LightGreen(),LightRed())&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;where I could get the Max Engine value of the expression. This doesn't return what I'm expecting; I'd like the maximum value of the Aggr function's expression. The Max of the Aggr function is only reporting the Max relative each engine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;How do I make the denominator a static value, especially if I can't assigned a variable using the Aggr function in the load script?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2016 15:29:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-Max-Aggr-Count-is-not-providing-desired-results/m-p/1125004#M19564</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-11T15:29:04Z</dc:date>
    </item>
    <item>
      <title>Re: Using Max(Aggr(Count(..))) is not providing desired results</title>
      <link>https://community.qlik.com/t5/App-Development/Using-Max-Aggr-Count-is-not-providing-desired-results/m-p/1125005#M19565</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Can you try this:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;=ColorMix1(&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;STRONG style="color: #3d3d3d; font-size: 13.3333px; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;Count(Distinct [Issues])*100/$(AllIssues) / &lt;/STRONG&gt;&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13px;"&gt;&lt;STRONG&gt;Max(&lt;SPAN style="color: #ff0000;"&gt;TOTAL&lt;/SPAN&gt; {$&amp;lt;Engine=&amp;gt;}Aggr(Count({$&amp;lt;Engine=&amp;gt;}Distinct [Issues])*100/$(AllIssues),Engine)),LightGreen(),LightRed())&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2016 17:09:53 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-Max-Aggr-Count-is-not-providing-desired-results/m-p/1125005#M19565</guid>
      <dc:creator>sunny_talwar</dc:creator>
      <dc:date>2016-05-11T17:09:53Z</dc:date>
    </item>
    <item>
      <title>Re: Using Max(Aggr(Count(..))) is not providing desired results</title>
      <link>https://community.qlik.com/t5/App-Development/Using-Max-Aggr-Count-is-not-providing-desired-results/m-p/1125006#M19566</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Wow, that was simple! Works exactly how I wanted it to!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks Sunny T!!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2016 17:34:45 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-Max-Aggr-Count-is-not-providing-desired-results/m-p/1125006#M19566</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-11T17:34:45Z</dc:date>
    </item>
    <item>
      <title>Re: Using Max(Aggr(Count(..))) is not providing desired results</title>
      <link>https://community.qlik.com/t5/App-Development/Using-Max-Aggr-Count-is-not-providing-desired-results/m-p/1125007#M19567</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;is your highest value always going to be 1.65 ? &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if it is why not just divided it by that &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=ColorMix1((Count(Distinct [Issues])*100&lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 13.3333px;"&gt;/$(AllIssues))&lt;/SPAN&gt;/1.65),LightGreen(),LightRed())&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;if it might change then I would recommend adding it as a variable instead &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2016 17:46:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-Max-Aggr-Count-is-not-providing-desired-results/m-p/1125007#M19567</guid>
      <dc:creator>ramoncova06</dc:creator>
      <dc:date>2016-05-11T17:46:24Z</dc:date>
    </item>
    <item>
      <title>Re: Using Max(Aggr(Count(..))) is not providing desired results</title>
      <link>https://community.qlik.com/t5/App-Development/Using-Max-Aggr-Count-is-not-providing-desired-results/m-p/1125008#M19568</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It won't always be 1.65...that's the problem. Based on selections and when I reload the app with new data every few days, that number will always change. That's the primary reason I wanted to have it come from an Aggr function.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2016 17:48:29 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-Max-Aggr-Count-is-not-providing-desired-results/m-p/1125008#M19568</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2016-05-11T17:48:29Z</dc:date>
    </item>
    <item>
      <title>Re: Using Max(Aggr(Count(..))) is not providing desired results</title>
      <link>https://community.qlik.com/t5/App-Development/Using-Max-Aggr-Count-is-not-providing-desired-results/m-p/1125009#M19569</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ok, then in that case aggr was the best option&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 May 2016 17:51:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Using-Max-Aggr-Count-is-not-providing-desired-results/m-p/1125009#M19569</guid>
      <dc:creator>ramoncova06</dc:creator>
      <dc:date>2016-05-11T17:51:03Z</dc:date>
    </item>
  </channel>
</rss>

