<?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 Coding KPI using Set Analysis and simple comparison functions in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Color-Coding-KPI-using-Set-Analysis-and-simple-comparison/m-p/1444334#M801461</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;New Qlik Sense/ Qlik View user here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to create a KPI, where the conditional coloring will filter based on two fields:&lt;/P&gt;&lt;P&gt;- &lt;SPAN style="font-size: 13.3333px;"&gt;&lt;EM&gt;EstArrivalTimeHrMinSec&lt;/EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&lt;/SPAN&gt;Estimated time taken for an Ambulance to arrive at Incident scene (Predicted time)]&lt;/P&gt;&lt;P&gt;- &lt;SPAN style="font-size: 13.3333px;"&gt;&lt;EM&gt;TimeTakenforAmbulancetoArrive &lt;/EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&lt;/SPAN&gt;Actual time taken for an Ambulance to arrive at Incident scene (Actual time)]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These two fields (fieldnames are in &lt;EM&gt;italics&lt;/EM&gt;) are both formatted in Time('mm:ss') format for comparison, and I basically want to calculate:&lt;/P&gt;&lt;P&gt;- If Actual time taken &amp;lt; Estimated time taken&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then I want the KPI to be displayed in &lt;SPAN style="color: #00ff00; font-size: 13.3333px;"&gt;GREEN &lt;/SPAN&gt;(actual time for the ambulance to arrive is earlier than predicted, which is GOOD).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-If Actual time taken &amp;gt; Estimated time taken&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then I want the KPI to be displayed in &lt;SPAN style="color: #ff0000; font-size: 13.3333px;"&gt;RED&lt;/SPAN&gt;(actual time taken is later than predicted, which is BAD).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have already tried creating a conditional coloring in a KPI object on my own, and here is my expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=If(Time(avg({$}&lt;EM&gt;TimeTakenforAmbulancetoArrive&lt;/EM&gt;), 'mm:ss') &amp;lt; Time(avg({$}&lt;EM&gt;EstArrivalTimeHrMinSec&lt;/EM&gt;), 'mm:ss'), Time(avg({$}&lt;EM&gt;TimeTakenforAmbulancetoArrive&lt;/EM&gt;), 'mm:ss'), Time(avg({$}&lt;EM&gt;EstArrivalTimeHrMinSec&lt;/EM&gt;), 'mm:ss'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sometimes the conditional coloring will work, sometimes it wouldn't, and I don't know what exactly I'm doing incorrectly with my expression. I have attached a snapshot below regarding the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the expression sometimes works (time displayed correctly as &lt;SPAN style="color: #00ff00; font-size: 13.3333px;"&gt;GREEN&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #00ff00; font-size: 13.3333px;"&gt;&lt;IMG alt="works1.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/184296_works1.PNG" style="height: 480px; width: 620px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the expression doesn't work (time should display as &lt;SPAN style="color: #00ff00;"&gt;GREEN&lt;SPAN style="color: #000000;"&gt; instead of &lt;SPAN style="color: #ff0000;"&gt;RED&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="qlik1.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/184295_qlik1.PNG" style="height: 455px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help! Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
    <dc:creator>Anonymous</dc:creator>
    <dc:date>2020-11-25T16:16:04Z</dc:date>
    <item>
      <title>Color Coding KPI using Set Analysis and simple comparison functions</title>
      <link>https://community.qlik.com/t5/QlikView/Color-Coding-KPI-using-Set-Analysis-and-simple-comparison/m-p/1444334#M801461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;New Qlik Sense/ Qlik View user here.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I want to create a KPI, where the conditional coloring will filter based on two fields:&lt;/P&gt;&lt;P&gt;- &lt;SPAN style="font-size: 13.3333px;"&gt;&lt;EM&gt;EstArrivalTimeHrMinSec&lt;/EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&lt;/SPAN&gt;Estimated time taken for an Ambulance to arrive at Incident scene (Predicted time)]&lt;/P&gt;&lt;P&gt;- &lt;SPAN style="font-size: 13.3333px;"&gt;&lt;EM&gt;TimeTakenforAmbulancetoArrive &lt;/EM&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; [&lt;/SPAN&gt;Actual time taken for an Ambulance to arrive at Incident scene (Actual time)]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;These two fields (fieldnames are in &lt;EM&gt;italics&lt;/EM&gt;) are both formatted in Time('mm:ss') format for comparison, and I basically want to calculate:&lt;/P&gt;&lt;P&gt;- If Actual time taken &amp;lt; Estimated time taken&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then I want the KPI to be displayed in &lt;SPAN style="color: #00ff00; font-size: 13.3333px;"&gt;GREEN &lt;/SPAN&gt;(actual time for the ambulance to arrive is earlier than predicted, which is GOOD).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-If Actual time taken &amp;gt; Estimated time taken&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;then I want the KPI to be displayed in &lt;SPAN style="color: #ff0000; font-size: 13.3333px;"&gt;RED&lt;/SPAN&gt;(actual time taken is later than predicted, which is BAD).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have already tried creating a conditional coloring in a KPI object on my own, and here is my expression:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=If(Time(avg({$}&lt;EM&gt;TimeTakenforAmbulancetoArrive&lt;/EM&gt;), 'mm:ss') &amp;lt; Time(avg({$}&lt;EM&gt;EstArrivalTimeHrMinSec&lt;/EM&gt;), 'mm:ss'), Time(avg({$}&lt;EM&gt;TimeTakenforAmbulancetoArrive&lt;/EM&gt;), 'mm:ss'), Time(avg({$}&lt;EM&gt;EstArrivalTimeHrMinSec&lt;/EM&gt;), 'mm:ss'))&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Sometimes the conditional coloring will work, sometimes it wouldn't, and I don't know what exactly I'm doing incorrectly with my expression. I have attached a snapshot below regarding the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the expression sometimes works (time displayed correctly as &lt;SPAN style="color: #00ff00; font-size: 13.3333px;"&gt;GREEN&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #00ff00; font-size: 13.3333px;"&gt;&lt;IMG alt="works1.PNG" class="jive-image image-2" src="https://community.qlik.com/legacyfs/online/184296_works1.PNG" style="height: 480px; width: 620px;" /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When the expression doesn't work (time should display as &lt;SPAN style="color: #00ff00;"&gt;GREEN&lt;SPAN style="color: #000000;"&gt; instead of &lt;SPAN style="color: #ff0000;"&gt;RED&lt;SPAN style="color: #000000;"&gt;)&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG alt="qlik1.PNG" class="jive-image image-1" src="https://community.qlik.com/legacyfs/online/184295_qlik1.PNG" style="height: 455px; width: 620px;" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please help! Thanks in advance.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 25 Nov 2020 16:16:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Color-Coding-KPI-using-Set-Analysis-and-simple-comparison/m-p/1444334#M801461</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2020-11-25T16:16:04Z</dc:date>
    </item>
    <item>
      <title>Re: Color Coding KPI using Set Analysis and simple comparison functions</title>
      <link>https://community.qlik.com/t5/QlikView/Color-Coding-KPI-using-Set-Analysis-and-simple-comparison/m-p/1444335#M801462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Equation seems worked. Can you share QVF file to test rather discuss on fly&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Nov 2017 09:51:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Color-Coding-KPI-using-Set-Analysis-and-simple-comparison/m-p/1444335#M801462</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2017-11-23T09:51:19Z</dc:date>
    </item>
    <item>
      <title>Re: Color Coding KPI using Set Analysis and simple comparison functions</title>
      <link>https://community.qlik.com/t5/QlikView/Color-Coding-KPI-using-Set-Analysis-and-simple-comparison/m-p/1444336#M801463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can share the .qvf file with you, but it draws data from a local data connection, and I don't think the sheet will run properly without the data. I am not able to give you the data though, unfortunately as it is confidential.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there another way I could pass you the file? Perhaps making a sample subset of my data?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 24 Nov 2017 02:08:24 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Color-Coding-KPI-using-Set-Analysis-and-simple-comparison/m-p/1444336#M801463</guid>
      <dc:creator>Anonymous</dc:creator>
      <dc:date>2017-11-24T02:08:24Z</dc:date>
    </item>
  </channel>
</rss>

