<?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 Color logic in QlikSense in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Color-logic-in-QlikSense/m-p/1887989#M73176</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;We have supervisors and mechanics in a table, I have written mechanics text color logic(Green,Amber,Red) based on my expression. Now I have to write&amp;nbsp; a color logic on top of the supervisor based mechanic color, suppose if one supervisor under having 5 mechanics , among this five mechanics any one mechanic is having red color the supervisor&amp;nbsp; name text color as red&amp;nbsp; &amp;nbsp;and&amp;nbsp;any one mechanics&amp;nbsp; is amber&amp;nbsp; the supervisor text color display amber, all are green it should green. like below..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sat_tok52_0-1643800690735.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/71447iF13AE810B8C1BCA8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sat_tok52_0-1643800690735.png" alt="sat_tok52_0-1643800690735.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any Help..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Wed, 02 Feb 2022 11:18:35 GMT</pubDate>
    <dc:creator>sat_tok52</dc:creator>
    <dc:date>2022-02-02T11:18:35Z</dc:date>
    <item>
      <title>Color logic in QlikSense</title>
      <link>https://community.qlik.com/t5/App-Development/Color-logic-in-QlikSense/m-p/1887989#M73176</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;
&lt;P&gt;We have supervisors and mechanics in a table, I have written mechanics text color logic(Green,Amber,Red) based on my expression. Now I have to write&amp;nbsp; a color logic on top of the supervisor based mechanic color, suppose if one supervisor under having 5 mechanics , among this five mechanics any one mechanic is having red color the supervisor&amp;nbsp; name text color as red&amp;nbsp; &amp;nbsp;and&amp;nbsp;any one mechanics&amp;nbsp; is amber&amp;nbsp; the supervisor text color display amber, all are green it should green. like below..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sat_tok52_0-1643800690735.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/71447iF13AE810B8C1BCA8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sat_tok52_0-1643800690735.png" alt="sat_tok52_0-1643800690735.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Any Help..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Feb 2022 11:18:35 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Color-logic-in-QlikSense/m-p/1887989#M73176</guid>
      <dc:creator>sat_tok52</dc:creator>
      <dc:date>2022-02-02T11:18:35Z</dc:date>
    </item>
    <item>
      <title>Re: Color logic in QlikSense</title>
      <link>https://community.qlik.com/t5/App-Development/Color-logic-in-QlikSense/m-p/1888146#M73184</link>
      <description>&lt;P&gt;What is the logic for coloring Mech?&lt;/P&gt;</description>
      <pubDate>Wed, 02 Feb 2022 13:26:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Color-logic-in-QlikSense/m-p/1888146#M73184</guid>
      <dc:creator>Almen</dc:creator>
      <dc:date>2022-02-02T13:26:56Z</dc:date>
    </item>
    <item>
      <title>Re: Color logic in QlikSense</title>
      <link>https://community.qlik.com/t5/App-Development/Color-logic-in-QlikSense/m-p/1888179#M73188</link>
      <description>&lt;P&gt;Hi Almen,&lt;/P&gt;
&lt;P&gt;Thanks for your reply. Below is the mechanic text color logic..&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If((aggr(Sum(Sales),Mechanic)/aggr(sum(SalesObjective),Mechanic)) &amp;gt;0.90,RGB(146,208,80), &lt;BR /&gt;If((aggr(Sum(Sales),Mechanic)/aggr(sum(SalesObjective),Mechanic))&amp;gt;=0.70, RGB(255,191,0),RGB(255,0,0)))&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Feb 2022 14:13:00 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Color-logic-in-QlikSense/m-p/1888179#M73188</guid>
      <dc:creator>sat_tok52</dc:creator>
      <dc:date>2022-02-02T14:13:00Z</dc:date>
    </item>
    <item>
      <title>Re: Color logic in QlikSense</title>
      <link>https://community.qlik.com/t5/App-Development/Color-logic-in-QlikSense/m-p/1888206#M73189</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;I have for you an example that might help you achieve the use case scenario, however please keep in mind that this is only to help get on the right path towards the resolution, as it might not be entirely the solution.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;1. I have the following dataset:&lt;/P&gt;

&lt;P&gt;&lt;IMG alt="IMAGE" src="https://lithium-response-prod.s3.us-west-2.amazonaws.com/qlik.response.lithium.com/RESPONSEIMAGE/c681a089-2fd7-4bdc-b3ba-a5edf4a700ef.default.png" /&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;As you can see I have &lt;STRONG&gt;4 supervisors&lt;/STRONG&gt; and I have &lt;STRONG&gt;3 mechanics&lt;/STRONG&gt; under each supervisor. My logic for coloring the mechanics is the field &lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;Value &lt;/STRONG&gt;&lt;/SPAN&gt;and the logic is:&lt;/P&gt;

&lt;UL&gt;
 &lt;LI&gt;If&lt;STRONG&gt; Value = 1&lt;/STRONG&gt; the mechanic's color is &lt;SPAN style="color:#2980b9"&gt;&lt;STRONG&gt;BLUE&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/LI&gt;
 &lt;LI&gt;If &lt;STRONG&gt;Value = 2&lt;/STRONG&gt; the mechanic's color is &lt;SPAN style="color:#c0392b"&gt;&lt;STRONG&gt;RED&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/LI&gt;
 &lt;LI&gt;If &lt;STRONG&gt;Value = 3&lt;/STRONG&gt; the mechanic's color is &lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;GREEN&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;2. Now I have used the following expression to color my mechanics:&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color:#2980b9"&gt;If&lt;/SPAN&gt;(&lt;SPAN style="color:#f39c12"&gt;Value&lt;/SPAN&gt;=1, &lt;SPAN style="color:#2980b9"&gt;Blue&lt;/SPAN&gt;(), &lt;SPAN style="color:#2980b9"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color:#f39c12"&gt;Value&lt;/SPAN&gt;=2, &lt;SPAN style="color:#2980b9"&gt;Red&lt;/SPAN&gt;(), &lt;SPAN style="color:#27ae60"&gt;Green&lt;/SPAN&gt;()))&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;3. The outcome so far is:&lt;/P&gt;

&lt;P&gt;&lt;IMG alt="IMAGE" src="https://lithium-response-prod.s3.us-west-2.amazonaws.com/qlik.response.lithium.com/RESPONSEIMAGE/14339cbf-77d0-4249-899f-bf605b53a47e.default.PNG" /&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Now based on your logic &lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;SupervisorA &lt;/STRONG&gt;&lt;/SPAN&gt;should appear as &lt;SPAN style="color:#2980b9"&gt;&lt;STRONG&gt;BLUE &lt;/STRONG&gt;&lt;/SPAN&gt;since it has at least &lt;SPAN style="color:#8e44ad"&gt;&lt;STRONG&gt;1&lt;STRONG&gt;&amp;nbsp;&lt;/STRONG&gt;BLUE mechanic&lt;/STRONG&gt;&lt;/SPAN&gt;, &lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;SupervisorB &lt;/STRONG&gt;&lt;/SPAN&gt;should appear as &lt;SPAN style="color:#c0392b"&gt;&lt;STRONG&gt;RED &lt;/STRONG&gt;&lt;/SPAN&gt;since it has at least&amp;nbsp;&lt;SPAN style="color:#8e44ad"&gt;&lt;STRONG&gt;1 RED mechanic&lt;/STRONG&gt;&lt;/SPAN&gt;, &lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;SupervisorC &lt;/STRONG&gt;&lt;/SPAN&gt;will appear &lt;SPAN style="color:#2980b9"&gt;&lt;STRONG&gt;BLUE&lt;/STRONG&gt;&lt;/SPAN&gt;, since there is at least &lt;SPAN style="color:#8e44ad"&gt;&lt;STRONG&gt;1&amp;nbsp;BLUE mechanic&lt;/STRONG&gt;&lt;/SPAN&gt; and &lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;SupervisorD &lt;/STRONG&gt;&lt;/SPAN&gt;should appear &lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;GREEN &lt;/STRONG&gt;&lt;/SPAN&gt;as all of the mechanics are &lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;GREEN&lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;4. Therefore, we have to implement the logic for the coloring and thus we need to find the patterns. To simplify the issue, I have the initial assumption that there are &lt;STRONG&gt;ONLY 3 &lt;/STRONG&gt;mechanics under each Supervisor so I have found the following patterns:&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color:#2980b9"&gt;&lt;STRONG&gt;Blue:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;UL&gt;
 &lt;LI&gt;3 Blue - 0 Green &amp;gt;&amp;gt; Total = 3&lt;/LI&gt;
 &lt;LI&gt;2 Blue - 1 Green &amp;gt;&amp;gt; Total = 5&lt;/LI&gt;
 &lt;LI&gt;1 Blue - 2 Green &amp;gt;&amp;gt; Total = 7&lt;/LI&gt;
 &lt;LI&gt;0 Blue - 3 Green &amp;gt;&amp;gt; Total = 9&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;&lt;STRONG&gt;Conclusion:&lt;/STRONG&gt;&lt;BR /&gt;
If 3&amp;lt;=X&amp;lt;=7 there is at least 1 &lt;SPAN style="color:#2980b9"&gt;&lt;STRONG&gt;BLUE&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color:#c0392b"&gt;&lt;STRONG&gt;Red:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;UL&gt;
 &lt;LI&gt;3 Red - 0 Green &amp;gt;&amp;gt; Total = 6&lt;/LI&gt;
 &lt;LI&gt;2 Red - 1 Green &amp;gt;&amp;gt; Total = 7&lt;/LI&gt;
 &lt;LI&gt;1 Red - 2 Green &amp;gt;&amp;gt; Total = 8&lt;/LI&gt;
 &lt;LI&gt;0 Red - 3 Green &amp;gt;&amp;gt; Total = 9&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;&lt;STRONG&gt;Conclusion:&lt;/STRONG&gt;&lt;BR /&gt;
If&amp;nbsp;6&amp;lt;=X&amp;lt;=8 there is at least 1 &lt;SPAN style="color:#c0392b"&gt;&lt;STRONG&gt;RED&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;Green:&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;BR /&gt;
3 Green &amp;gt;&amp;gt; Total = 9&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;Conclusion:&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;If X=9 then all are &lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;GREEN&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;5. Now we know that all we have to do, is to sum all the values of the field &lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;Value &lt;/STRONG&gt;&lt;/SPAN&gt;for all the &lt;SPAN style="color:#8e44ad"&gt;&lt;STRONG&gt;mechanics &lt;/STRONG&gt;&lt;/SPAN&gt;for each &lt;SPAN style="color:#2980b9"&gt;&lt;STRONG&gt;supervisor &lt;/STRONG&gt;&lt;/SPAN&gt;separately and then check to which range does it belong. However, this will only work under the hypothesis that there are only &lt;STRONG&gt;&lt;SPAN style="color:#8e44ad"&gt;3 mechanics&lt;/SPAN&gt; &lt;/STRONG&gt;for each &lt;SPAN style="color:#2980b9"&gt;&lt;STRONG&gt;supervisor&lt;/STRONG&gt;&lt;/SPAN&gt;, therefore we need a more scalable solution.&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;6. For this, I have used the following expressions:&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;First we need to count all the mechanics for each supervisor and the expression for that is:&lt;BR /&gt;
&lt;STRONG&gt;&lt;SPAN style="color:#8e44ad"&gt;CountMechanicsOfEachSupervisor&amp;nbsp;&lt;/SPAN&gt;= &lt;SPAN style="color:#2980b9"&gt;Sum&lt;/SPAN&gt;(&lt;SPAN style="color:#2980b9"&gt;Aggr&lt;/SPAN&gt;( &lt;SPAN style="color:#2980b9"&gt;NODISTINCT Count&lt;/SPAN&gt;(&lt;SPAN style="color:#f39c12"&gt;Mechanic&lt;/SPAN&gt;), &lt;SPAN style="color:#f39c12"&gt;Supervisor&lt;/SPAN&gt;)&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Then we need to sum&amp;nbsp;all the values of all the mechanics&amp;nbsp;for each supervisor and the expression for that is:&lt;BR /&gt;
&lt;STRONG&gt;&lt;SPAN style="color:#7f8c8d"&gt;SumValuesForAllMechanicsOfParticularSupervisor &lt;/SPAN&gt;= &lt;SPAN style="color:#2980b9"&gt;Sum&lt;/SPAN&gt;(&lt;SPAN style="color:#2980b9"&gt;Aggr&lt;/SPAN&gt;( &lt;SPAN style="color:#2980b9"&gt;NODISTINCT&lt;/SPAN&gt; &lt;SPAN style="color:#2980b9"&gt;Sum&lt;/SPAN&gt;(&lt;SPAN style="color:#f39c12"&gt;Value&lt;/SPAN&gt;), &lt;SPAN style="color:#f39c12"&gt;Supervisor&lt;/SPAN&gt;))&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;7. Now to make sure that the next complicated expression is simplified, I have created 3 helping variables:&lt;/P&gt;

&lt;UL&gt;
 &lt;LI&gt;&lt;STRONG&gt;vBlue &lt;/STRONG&gt;with definition 1&lt;/LI&gt;
 &lt;LI&gt;&lt;STRONG&gt;vRed &lt;/STRONG&gt;with definition 2&lt;/LI&gt;
 &lt;LI&gt;&lt;STRONG&gt;vGreen &lt;/STRONG&gt;with definition 3&lt;/LI&gt;
&lt;/UL&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;8. Final step is to combine the expressions above with &lt;STRONG&gt;&lt;SPAN style="color:#2980b9"&gt;If(&lt;/SPAN&gt;) &lt;/STRONG&gt;functions to see each time within which range we are. To do so I have followed the following expression:&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;STRONG&gt;&lt;SPAN style="color:#2980b9"&gt;If&lt;/SPAN&gt;(&lt;BR /&gt;
&amp;nbsp; &lt;SPAN style="color:#7f8c8d"&gt;SumValuesForAllMechanicsOfParticularSupervisor&lt;/SPAN&gt; &amp;gt;= &lt;SPAN style="color:#8e44ad"&gt;CountMechanicsOfEachSupervisor &lt;/SPAN&gt;* &lt;SPAN style="color:#27ae60"&gt;'$(vBlue)'&lt;/SPAN&gt;)&amp;nbsp;&lt;BR /&gt;
&amp;nbsp; and&amp;nbsp;&lt;BR /&gt;
&amp;nbsp; &lt;SPAN style="color:#999999"&gt;SumValuesForAllMechanicsOfParticularSupervisor &lt;/SPAN&gt;&amp;lt;= (&lt;SPAN style="color:#8e44ad"&gt;CountMechanicsOfEachSupervisor &lt;/SPAN&gt;- 1) * 3 + &lt;SPAN style="color:#27ae60"&gt;'$(vBlue)'&lt;/SPAN&gt;),&amp;nbsp;&lt;BR /&gt;
&amp;nbsp; Blue(),&amp;nbsp;&lt;BR /&gt;
&amp;nbsp; If(&lt;BR /&gt;
&amp;nbsp; &amp;nbsp; &lt;SPAN style="color:#7f8c8d"&gt;SumValuesForAllMechanicsOfParticularSupervisor&lt;/SPAN&gt; &amp;gt;= &lt;SPAN style="color:#8e44ad"&gt;CountMechanicsOfEachSupervisor &lt;/SPAN&gt;*&lt;SPAN style="color:#27ae60"&gt; '$(vRed)'&lt;/SPAN&gt;)&amp;nbsp;&lt;BR /&gt;
&amp;nbsp; &amp;nbsp; and&amp;nbsp;&lt;BR /&gt;
&amp;nbsp; &amp;nbsp; &lt;SPAN style="color:#7f8c8d"&gt;SumValuesForAllMechanicsOfParticularSupervisor &lt;/SPAN&gt;&amp;lt;= (&lt;SPAN style="color:#8e44ad"&gt;CountMechanicsOfEachSupervisor &lt;/SPAN&gt;- 1) * 3 +&lt;SPAN style="color:#27ae60"&gt; '$(vRed)'&lt;/SPAN&gt;),&amp;nbsp;&lt;BR /&gt;
&amp;nbsp; &amp;nbsp; Red(),&amp;nbsp;&lt;BR /&gt;
&amp;nbsp; &amp;nbsp; If(&lt;BR /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;SPAN style="color:#7f8c8d"&gt;SumValuesForAllMechanicsOfParticularSupervisor &lt;/SPAN&gt;= &lt;SPAN style="color:#8e44ad"&gt;CountMechanicsOfEachSupervisor &lt;/SPAN&gt;*&lt;SPAN style="color:#27ae60"&gt; '$(vGreen)'&lt;/SPAN&gt;),&amp;nbsp;&lt;BR /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Green(),&amp;nbsp;&lt;BR /&gt;
&amp;nbsp; &amp;nbsp; &amp;nbsp; Brown()&lt;BR /&gt;
&amp;nbsp; &amp;nbsp; )&lt;BR /&gt;
&amp;nbsp; )&lt;BR /&gt;
)&lt;/STRONG&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;You will have to replace the&amp;nbsp;&lt;SPAN style="color:#7f8c8d"&gt;&lt;STRONG&gt;SumValuesForAllMechanicsOfParticularSupervisor &lt;/STRONG&gt;&lt;/SPAN&gt;with the actual expression and&amp;nbsp;&lt;SPAN style="color:#8e44ad"&gt;&lt;STRONG&gt;CountMechanicsOfEachSupervisor &lt;/STRONG&gt;&lt;/SPAN&gt;with the actual expression from above!&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Allow me to explain the logic behind it:&lt;/P&gt;

&lt;OL&gt;
 &lt;LI&gt;First we get the sum of all values of all &lt;SPAN style="color:#8e44ad"&gt;&lt;STRONG&gt;mechanics &lt;/STRONG&gt;&lt;/SPAN&gt;for each supervisor and we check if the value is within the range.&lt;/LI&gt;
 &lt;LI&gt;For the minimum value of each range, we know that it means either all the &lt;SPAN style="color:#8e44ad"&gt;&lt;STRONG&gt;mechanics &lt;/STRONG&gt;&lt;/SPAN&gt;are &lt;SPAN style="color:#c0392b"&gt;&lt;STRONG&gt;RED &lt;/STRONG&gt;&lt;/SPAN&gt;or all the &lt;SPAN style="color:#8e44ad"&gt;&lt;STRONG&gt;mechanics &lt;/STRONG&gt;&lt;/SPAN&gt;are &lt;SPAN style="color:#2980b9"&gt;&lt;STRONG&gt;BLUE &lt;/STRONG&gt;&lt;/SPAN&gt;respectively.&lt;/LI&gt;
 &lt;LI&gt;Therefore the calculation will be the number of &lt;SPAN style="color:#8e44ad"&gt;&lt;STRONG&gt;mechanics &lt;/STRONG&gt;&lt;/SPAN&gt;under each &lt;SPAN style="color:#2980b9"&gt;&lt;STRONG&gt;supervisor &lt;/STRONG&gt;&lt;/SPAN&gt;multiplied by the numeric value that we check for that color, wither 1 for &lt;SPAN style="color:#c0392b"&gt;&lt;STRONG&gt;RED &lt;/STRONG&gt;&lt;/SPAN&gt;or 2 for &lt;SPAN style="color:#2980b9"&gt;&lt;STRONG&gt;BLUE &lt;/STRONG&gt;&lt;/SPAN&gt;respectively.&lt;/LI&gt;
 &lt;LI&gt;For the maximum value of the range we know that either all &lt;SPAN style="color:#8e44ad"&gt;&lt;STRONG&gt;mechanics &lt;/STRONG&gt;&lt;/SPAN&gt;are &lt;SPAN style="color:#c0392b"&gt;&lt;STRONG&gt;RED&lt;/STRONG&gt;&lt;/SPAN&gt; except one or all &lt;SPAN style="color:#8e44ad"&gt;&lt;STRONG&gt;mechanics &lt;/STRONG&gt;&lt;/SPAN&gt;are &lt;SPAN style="color:#2980b9"&gt;&lt;STRONG&gt;BLUE &lt;/STRONG&gt;&lt;/SPAN&gt;except one.&lt;/LI&gt;
 &lt;LI&gt;Therefore the calculation will be the count of &lt;SPAN style="color:#8e44ad"&gt;&lt;STRONG&gt;mechanics &lt;/STRONG&gt;&lt;/SPAN&gt;for each &lt;SPAN style="color:#2980b9"&gt;&lt;STRONG&gt;supervisor &lt;/STRONG&gt;&lt;/SPAN&gt;- 1 and the result multiplied by 3 which is the indication &lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;GREEN&lt;/STRONG&gt;&lt;/SPAN&gt;. After that we add the number 1 for the only &lt;SPAN style="color:#8e44ad"&gt;&lt;STRONG&gt;mechanic &lt;/STRONG&gt;&lt;/SPAN&gt;that is &lt;SPAN style="color:#c0392b"&gt;&lt;STRONG&gt;RED &lt;/STRONG&gt;&lt;/SPAN&gt;or 2 for the only &lt;SPAN style="color:#8e44ad"&gt;&lt;STRONG&gt;mechanic&lt;/STRONG&gt;&lt;/SPAN&gt; that is &lt;SPAN style="color:#2980b9"&gt;&lt;STRONG&gt;BLUE &lt;/STRONG&gt;&lt;/SPAN&gt;respectively.&amp;nbsp;&lt;/LI&gt;
 &lt;LI&gt;Final check is if the sum of all the values equals to the count of all the &lt;SPAN style="color:#8e44ad"&gt;&lt;STRONG&gt;mechanics &lt;/STRONG&gt;&lt;/SPAN&gt;for each &lt;SPAN style="color:#2980b9"&gt;&lt;STRONG&gt;supervisor &lt;/STRONG&gt;&lt;/SPAN&gt;multiplied by the number 3 for &lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;GREEN&lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;/LI&gt;
&lt;/OL&gt;

&lt;P&gt;9. The output is:&lt;/P&gt;

&lt;P&gt;&lt;IMG alt="IMAGE" src="https://lithium-response-prod.s3.us-west-2.amazonaws.com/qlik.response.lithium.com/RESPONSEIMAGE/31216e75-ecca-4b57-8162-018167606ea9.default.PNG" /&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;As you can see &lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;SupervisorA &lt;/STRONG&gt;&lt;/SPAN&gt;is &lt;SPAN style="color:#2980b9"&gt;&lt;STRONG&gt;BLUE &lt;/STRONG&gt;&lt;/SPAN&gt;because at least one &lt;SPAN style="color:#8e44ad"&gt;&lt;STRONG&gt;mechanic &lt;/STRONG&gt;&lt;/SPAN&gt;is &lt;SPAN style="color:#2980b9"&gt;&lt;STRONG&gt;BLUE&lt;/STRONG&gt;&lt;/SPAN&gt;, &lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;SupervisorB &lt;/STRONG&gt;&lt;/SPAN&gt;is &lt;SPAN style="color:#c0392b"&gt;&lt;STRONG&gt;RED &lt;/STRONG&gt;&lt;/SPAN&gt;because at least 1 &lt;SPAN style="color:#8e44ad"&gt;&lt;STRONG&gt;mechanic &lt;/STRONG&gt;&lt;/SPAN&gt;is &lt;SPAN style="color:#c0392b"&gt;&lt;STRONG&gt;RED&lt;/STRONG&gt;&lt;/SPAN&gt;, &lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;SupervisorC &lt;/STRONG&gt;&lt;/SPAN&gt;is &lt;SPAN style="color:#2980b9"&gt;&lt;STRONG&gt;BLUE &lt;/STRONG&gt;&lt;/SPAN&gt;because there is at least one &lt;SPAN style="color:#8e44ad"&gt;&lt;STRONG&gt;mechanic &lt;/STRONG&gt;&lt;/SPAN&gt;&lt;SPAN style="color:#2980b9"&gt;&lt;STRONG&gt;BLUE &lt;/STRONG&gt;&lt;/SPAN&gt;and &lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;SupervisorD &lt;/STRONG&gt;&lt;/SPAN&gt;is &lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;GREEN &lt;/STRONG&gt;&lt;/SPAN&gt;because all the &lt;SPAN style="color:#8e44ad"&gt;&lt;STRONG&gt;mechanics &lt;/STRONG&gt;&lt;/SPAN&gt;are &lt;SPAN style="color:#27ae60"&gt;&lt;STRONG&gt;GREEN&lt;/STRONG&gt;&lt;/SPAN&gt;.&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;In your use case scenario I would recommend to use your expressions to generate the values in &lt;STRONG&gt;Data load editor&lt;/STRONG&gt; and create the additional field "&lt;SPAN style="color:#f39c12"&gt;&lt;STRONG&gt;Value&lt;/STRONG&gt;&lt;/SPAN&gt;". Because as you can see, the calculations are already complicated. So instead of coloring then your mechanics with the expression you shared, you will just do so with &lt;STRONG&gt;&lt;SPAN style="color:#2980b9"&gt;If&lt;/SPAN&gt;(&lt;SPAN style="color:#f39c12"&gt;Value&lt;/SPAN&gt;=1, &lt;SPAN style="color:#2980b9"&gt;Blue&lt;/SPAN&gt;(), &lt;SPAN style="color:#2980b9"&gt;if&lt;/SPAN&gt;(&lt;SPAN style="color:#f39c12"&gt;Value&lt;/SPAN&gt;=2, &lt;SPAN style="color:#2980b9"&gt;Red&lt;/SPAN&gt;(), &lt;SPAN style="color:#2980b9"&gt;Green&lt;/SPAN&gt;()))&lt;/STRONG&gt; since the values will be already calculated!&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="color:#7f8c8d"&gt;&lt;EM&gt;&lt;STRONG&gt;As I have mentioned above, this might not be a complete solution for your use case scenario, however it might help you get on the right path towards the resolution!&amp;nbsp;&lt;/STRONG&gt;&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Feb 2022 14:39:18 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Color-logic-in-QlikSense/m-p/1888206#M73189</guid>
      <dc:creator>Andrei_Cusnir</dc:creator>
      <dc:date>2022-02-02T14:39:18Z</dc:date>
    </item>
  </channel>
</rss>

