<?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: How to colour an expression by the desired dimension? in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/How-to-colour-an-expression-by-the-desired-dimension/m-p/2154276#M93517</link>
    <description>&lt;P&gt;Always pause conditions and use table object to see.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;if(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Count({&amp;lt;ACTION_CODE={'COMPLETE'}, MainSFC={'Main SFC'}&amp;gt;} DISTINCT SFC) / Count(DISTINCT WorkingDay)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Avg(TOTAL Aggr(Count({&amp;lt;ACTION_CODE={'COMPLETE'}, MainSFC={'Main SFC'}&amp;gt;} DISTINCT SFC) / Count(DISTINCT WorkingDay), MainSFC)),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1, // Red color if below the average&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2 // Blue color if above the average&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 18 Dec 2023 19:05:07 GMT</pubDate>
    <dc:creator>Anil_Babu_Samineni</dc:creator>
    <dc:date>2023-12-18T19:05:07Z</dc:date>
    <item>
      <title>How to colour an expression by the desired dimension?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-colour-an-expression-by-the-desired-dimension/m-p/2153957#M93480</link>
      <description>&lt;P&gt;I have an expression that takes in a measure, and according to its value, gives me a colour for the columns if its value is above or below the average.&lt;/P&gt;
&lt;P&gt;if(&lt;BR /&gt;Count({&amp;lt;ACTION_CODE={'COMPLETE'}, MainSFC={'Main SFC'}&amp;gt;} DISTINCT SFC) / Count(DISTINCT WorkingDay) &lt;BR /&gt;&amp;lt; &lt;BR /&gt;Avg(TOTAL Aggr(Count({&amp;lt;ACTION_CODE={'COMPLETE'}, MainSFC={'Main SFC'}&amp;gt;} DISTINCT SFC) / Count(DISTINCT WorkingDay), MainSFC)),&lt;BR /&gt;RGB(255, 0, 0), // Red color if below the average&lt;BR /&gt;RGB(0, 0, 255) // Blue color if above the average&lt;BR /&gt;)&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The problem is, this is not giving me the correct results. Only in few cases does it work, but other cases when the value is below the mean, it still doesn't get coloured red.&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="alespooletto_0-1702910494647.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/125650i4F23E4247A8E23A6/image-size/medium?v=v2&amp;amp;px=400" role="button" title="alespooletto_0-1702910494647.png" alt="alespooletto_0-1702910494647.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2023 14:41:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-colour-an-expression-by-the-desired-dimension/m-p/2153957#M93480</guid>
      <dc:creator>alespooletto</dc:creator>
      <dc:date>2023-12-18T14:41:40Z</dc:date>
    </item>
    <item>
      <title>Re: How to colour an expression by the desired dimension?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-colour-an-expression-by-the-desired-dimension/m-p/2154158#M93506</link>
      <description>&lt;P&gt;could you print what happening because just look the expression I can't see nothing wrong&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2023 14:35:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-colour-an-expression-by-the-desired-dimension/m-p/2154158#M93506</guid>
      <dc:creator>TcnCunha_M</dc:creator>
      <dc:date>2023-12-18T14:35:32Z</dc:date>
    </item>
    <item>
      <title>Re: How to colour an expression by the desired dimension?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-colour-an-expression-by-the-desired-dimension/m-p/2154163#M93507</link>
      <description>&lt;P&gt;Yes， thank you. I added the information&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2023 14:42:02 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-colour-an-expression-by-the-desired-dimension/m-p/2154163#M93507</guid>
      <dc:creator>alespooletto</dc:creator>
      <dc:date>2023-12-18T14:42:02Z</dc:date>
    </item>
    <item>
      <title>Re: How to colour an expression by the desired dimension?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-colour-an-expression-by-the-desired-dimension/m-p/2154276#M93517</link>
      <description>&lt;P&gt;Always pause conditions and use table object to see.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;if(&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Count({&amp;lt;ACTION_CODE={'COMPLETE'}, MainSFC={'Main SFC'}&amp;gt;} DISTINCT SFC) / Count(DISTINCT WorkingDay)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Avg(TOTAL Aggr(Count({&amp;lt;ACTION_CODE={'COMPLETE'}, MainSFC={'Main SFC'}&amp;gt;} DISTINCT SFC) / Count(DISTINCT WorkingDay), MainSFC)),&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;1, // Red color if below the average&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2 // Blue color if above the average&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Dec 2023 19:05:07 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-colour-an-expression-by-the-desired-dimension/m-p/2154276#M93517</guid>
      <dc:creator>Anil_Babu_Samineni</dc:creator>
      <dc:date>2023-12-18T19:05:07Z</dc:date>
    </item>
    <item>
      <title>Re: How to colour an expression by the desired dimension?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-colour-an-expression-by-the-desired-dimension/m-p/2154429#M93533</link>
      <description>&lt;P&gt;simple question, where are you adding this conditional to calculate ?&lt;BR /&gt;&lt;BR /&gt;I understand you want to put red all the cases where they are going bellow the trend line,&amp;nbsp;&lt;BR /&gt;this is trend line ?&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;&amp;nbsp;Avg(TOTAL Aggr(Count({&amp;lt;ACTION_CODE={'COMPLETE'}, MainSFC={'Main SFC'}&amp;gt;} DISTINCT SFC) / Count(DISTINCT WorkingDay), MainSFC)&lt;BR /&gt;&lt;BR /&gt;&lt;/STRONG&gt;and could make both are master items ? to make live easy to make If (Master_ITEM_1 &amp;lt; mASTER_ITEM_2 , RED(),BLUE())&lt;BR /&gt;&lt;BR /&gt;try like this&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="TcnCunha_M_0-1702975450753.png" style="width: 999px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/125714i8458EC6E4761F194/image-size/large?v=v2&amp;amp;px=999" role="button" title="TcnCunha_M_0-1702975450753.png" alt="TcnCunha_M_0-1702975450753.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Dec 2023 08:47:17 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-colour-an-expression-by-the-desired-dimension/m-p/2154429#M93533</guid>
      <dc:creator>TcnCunha_M</dc:creator>
      <dc:date>2023-12-19T08:47:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to colour an expression by the desired dimension?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-colour-an-expression-by-the-desired-dimension/m-p/2154896#M93557</link>
      <description>&lt;P&gt;So this is a good idea, but unfortunately it's really the second measure that doesn't seem to work out well.&amp;nbsp; I have to work and improve it to make it functional.&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 07:23:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-colour-an-expression-by-the-desired-dimension/m-p/2154896#M93557</guid>
      <dc:creator>alespooletto</dc:creator>
      <dc:date>2023-12-20T07:23:05Z</dc:date>
    </item>
    <item>
      <title>Re: How to colour an expression by the desired dimension?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-colour-an-expression-by-the-desired-dimension/m-p/2154907#M93558</link>
      <description>&lt;P&gt;OK&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;I see so you have a problem with your expression&lt;BR /&gt;&lt;BR /&gt;I may suggest :&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;Count( TOTAL&amp;nbsp; {&amp;lt;ACTION_CODE={'COMPLETE'}, MainSFC={'Main SFC'}&amp;gt;} DISTINCT SFC) / Count(WorkingDay)&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;I believe this should be your total scenario or something like this.&lt;BR /&gt;&lt;BR /&gt;since there is a problem with your expression I believe the answer from Anil or my you should mark as right awnser&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 08:00:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-colour-an-expression-by-the-desired-dimension/m-p/2154907#M93558</guid>
      <dc:creator>TcnCunha_M</dc:creator>
      <dc:date>2023-12-20T08:00:52Z</dc:date>
    </item>
    <item>
      <title>Re: How to colour an expression by the desired dimension?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-colour-an-expression-by-the-desired-dimension/m-p/2154922#M93561</link>
      <description>&lt;P&gt;Yes, thank you. I was able to solve the expression mistake, and it's thanks to both of you pointing out ways to find this out.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;However&amp;nbsp;&lt;a href="https://community.qlik.com/t5/user/viewprofilepage/user-id/246109"&gt;@TcnCunha_M&lt;/a&gt;&amp;nbsp;I still have an issue, as when I place the measures inside, I expect to be able to compare them all with the maximum average that I get. For example here:&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="alespooletto_0-1703061922775.png" style="width: 400px;"&gt;&lt;img src="https://community.qlik.com/t5/image/serverpage/image-id/125846iAB88999507CAE218/image-size/medium?v=v2&amp;amp;px=400" role="button" title="alespooletto_0-1703061922775.png" alt="alespooletto_0-1703061922775.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt;&lt;BR /&gt;I want to compare all of those rows against the 191 at the top. The current formula of the second column is :&lt;BR /&gt;&lt;BR /&gt;Count( {&amp;lt; ACTION_CODE = {'COMPLETE'}, MainSFC = {'Main SFC'}&amp;gt;} distinct SFC) / Count(Distinct WorkingDay)&lt;/P&gt;
&lt;P&gt;And instead of a breakdown by every row, I want it to always output its total. Can you help me figure this out? It seems like using Sum(All) and Sum(Total) it doesn't seem to work.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 20 Dec 2023 08:53:58 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-colour-an-expression-by-the-desired-dimension/m-p/2154922#M93561</guid>
      <dc:creator>alespooletto</dc:creator>
      <dc:date>2023-12-20T08:53:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to colour an expression by the desired dimension?</title>
      <link>https://community.qlik.com/t5/App-Development/How-to-colour-an-expression-by-the-desired-dimension/m-p/2155504#M93600</link>
      <description>&lt;P&gt;you probably need to aggregate by the&amp;nbsp; dimensions and use total like&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Sum ( TOTAL&lt;/P&gt;
&lt;P&gt;Aggr(&lt;BR /&gt;&lt;SPAN&gt;Count( {&amp;lt; ACTION_CODE = {'COMPLETE'}, MainSFC = {'Main SFC'}&amp;gt;} distinct SFC) / Count(Distinct WorkingDay)&lt;BR /&gt;&amp;nbsp;Fields )&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;)m&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 21 Dec 2023 14:33:11 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/How-to-colour-an-expression-by-the-desired-dimension/m-p/2155504#M93600</guid>
      <dc:creator>TcnCunha_M</dc:creator>
      <dc:date>2023-12-21T14:33:11Z</dc:date>
    </item>
  </channel>
</rss>

