<?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 Problem with a color expression in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Problem-with-a-color-expression/m-p/1650018#M48488</link>
    <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I am using this expression as KPI, which is the std deviation of number of connections over the daily average:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;(count({$&amp;lt;date_id={"$(=max(date_id))"}&amp;gt;}connect_time) - (count({$&amp;lt;date_id=&amp;gt;}connect_time)/count(distinct {$&amp;lt;date_id=&amp;gt;}date_id)))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;/&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;(count({$&amp;lt;date_id=&amp;gt;}connect_time)/count(distinct {$&amp;lt;date_id=&amp;gt;}date_id))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;also I built a bar chart to see this deviation by user with the following color expression:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if(((count({$&amp;lt;date_id={"$(=max(date_id))"}&amp;gt;}connect_time)&amp;nbsp;&lt;/EM&gt;&lt;EM&gt;-&amp;nbsp;&lt;/EM&gt;&lt;EM&gt;(count({$&amp;lt;date_id=&amp;gt;}connect_time)/count(distinct date_id)))&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;/&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;(count({$&amp;lt;date_id=&amp;gt;}connect_time)/count(distinct date_id)))&amp;lt;=0.50,Green(),rgb(255,31,31))&lt;/EM&gt;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;KPI expression and color expression work for maximum date (in my case 31/10/2019)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture1.png" style="width: 598px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/24232i583FF579E050A2FF/image-dimensions/598x816?v=v2" width="598" height="816" role="button" title="Capture1.png" alt="Capture1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But if I pick the previous day on the date filter panel (30/10/2019) or other days, KPI expression still works but color expression doesn't:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture2.png" style="width: 708px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/24233iF1C696E12C0D3CB2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture2.png" alt="Capture2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could anyone help me?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;</description>
    <pubDate>Sat, 16 Nov 2024 04:02:46 GMT</pubDate>
    <dc:creator>mtabernad</dc:creator>
    <dc:date>2024-11-16T04:02:46Z</dc:date>
    <item>
      <title>Problem with a color expression</title>
      <link>https://community.qlik.com/t5/App-Development/Problem-with-a-color-expression/m-p/1650018#M48488</link>
      <description>&lt;P&gt;Hi everyone,&lt;/P&gt;&lt;P&gt;I am using this expression as KPI, which is the std deviation of number of connections over the daily average:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;(count({$&amp;lt;date_id={"$(=max(date_id))"}&amp;gt;}connect_time) - (count({$&amp;lt;date_id=&amp;gt;}connect_time)/count(distinct {$&amp;lt;date_id=&amp;gt;}date_id)))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;/&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;(count({$&amp;lt;date_id=&amp;gt;}connect_time)/count(distinct {$&amp;lt;date_id=&amp;gt;}date_id))&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;also I built a bar chart to see this deviation by user with the following color expression:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;if(((count({$&amp;lt;date_id={"$(=max(date_id))"}&amp;gt;}connect_time)&amp;nbsp;&lt;/EM&gt;&lt;EM&gt;-&amp;nbsp;&lt;/EM&gt;&lt;EM&gt;(count({$&amp;lt;date_id=&amp;gt;}connect_time)/count(distinct date_id)))&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;/&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;(count({$&amp;lt;date_id=&amp;gt;}connect_time)/count(distinct date_id)))&amp;lt;=0.50,Green(),rgb(255,31,31))&lt;/EM&gt;&lt;/P&gt;&lt;DIV class="mceNonEditable lia-copypaste-placeholder"&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;KPI expression and color expression work for maximum date (in my case 31/10/2019)&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture1.png" style="width: 598px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/24232i583FF579E050A2FF/image-dimensions/598x816?v=v2" width="598" height="816" role="button" title="Capture1.png" alt="Capture1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;But if I pick the previous day on the date filter panel (30/10/2019) or other days, KPI expression still works but color expression doesn't:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Capture2.png" style="width: 708px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/24233iF1C696E12C0D3CB2/image-size/large?v=v2&amp;amp;px=999" role="button" title="Capture2.png" alt="Capture2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Could anyone help me?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you very much.&lt;/P&gt;</description>
      <pubDate>Sat, 16 Nov 2024 04:02:46 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Problem-with-a-color-expression/m-p/1650018#M48488</guid>
      <dc:creator>mtabernad</dc:creator>
      <dc:date>2024-11-16T04:02:46Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with a color expression</title>
      <link>https://community.qlik.com/t5/App-Development/Problem-with-a-color-expression/m-p/1650217#M48507</link>
      <description>&lt;P&gt;Your expression for the KPI is not matching your expression for the color definition.&amp;nbsp; You are missing sthe set expresions is formula segments as show below in the pic.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Expression Diff.PNG" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/24268iDD54E44D0FB79273/image-size/large?v=v2&amp;amp;px=999" role="button" title="Expression Diff.PNG" alt="Expression Diff.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is always a tricky excercise for me.&amp;nbsp; I reduce risk by copying and pasting my KPI formula into my If() statement.&lt;/P&gt;&lt;P&gt;Hope this helps,&lt;/P&gt;&lt;P&gt;Nate&lt;/P&gt;</description>
      <pubDate>Fri, 22 Nov 2019 15:43:38 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Problem-with-a-color-expression/m-p/1650217#M48507</guid>
      <dc:creator>hallquist_nate</dc:creator>
      <dc:date>2019-11-22T15:43:38Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with a color expression</title>
      <link>https://community.qlik.com/t5/App-Development/Problem-with-a-color-expression/m-p/1650557#M48537</link>
      <description>&lt;P&gt;Ohhh! You were sooo right! I don't know why I didn't realize about it. Thank you very much!&lt;/P&gt;</description>
      <pubDate>Mon, 25 Nov 2019 09:28:19 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Problem-with-a-color-expression/m-p/1650557#M48537</guid>
      <dc:creator>mtabernad</dc:creator>
      <dc:date>2019-11-25T09:28:19Z</dc:date>
    </item>
  </channel>
</rss>

