<?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: Color by Expression, 3 if statements in App Development</title>
    <link>https://community.qlik.com/t5/App-Development/Color-by-Expression-3-if-statements/m-p/1826513#M67960</link>
    <description>&lt;P&gt;Hi, maybe with:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;if(Alt(avg({&amp;lt;Coached={1}&amp;gt;}
  avg({&amp;lt;epf={1},[Year]={$(=vCurrentYear-1)},[Month]={" 
  &amp;lt;$(vCurrentMonth)"}&amp;gt;}if(aggr(sum(Cost),PersonTime)&amp;lt;&amp;gt;0,aggr(Sum(distinct {&amp;lt;epf={1}&amp;gt;}CashReceived),PersonTime)))
,PersonKey)),0)=0, RGB(color), [YourCurrentIf])&lt;/LI-CODE&gt;</description>
    <pubDate>Wed, 04 Aug 2021 06:26:52 GMT</pubDate>
    <dc:creator>rubenmarin</dc:creator>
    <dc:date>2021-08-04T06:26:52Z</dc:date>
    <item>
      <title>Color by Expression, 3 if statements</title>
      <link>https://community.qlik.com/t5/App-Development/Color-by-Expression-3-if-statements/m-p/1826390#M67953</link>
      <description>&lt;P&gt;I am trying to update an app that currently using a color by expression with an if statement (so two colors are present). I am trying to add a third color/filter.&amp;nbsp; I have included the code below. The additional filter I am trying to add is to provide a different color for anyone who has a 0/null value for&amp;nbsp;&lt;SPAN&gt;&amp;lt;epf={1},[Year]={$(=&lt;/SPAN&gt;&lt;SPAN&gt;vCurrentYear-1)},[Month]={"&amp;lt;$(&lt;/SPAN&gt;&lt;SPAN&gt;vCurrentMonth)"}&amp;gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;if(avg({&amp;lt;Coached={1}&amp;gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; aggr((&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; avg({&amp;lt;epf={1},[Year]={$(=&lt;/SPAN&gt;&lt;SPAN&gt;vCurrentYear)},[Month]={"&amp;lt;$(&lt;/SPAN&gt;&lt;SPAN&gt;vCurrentMonth)"}&amp;gt;}if(aggr(sum(&lt;/SPAN&gt;&lt;SPAN&gt;Cost),PersonTime)&amp;lt;&amp;gt;0,aggr(&lt;/SPAN&gt;&lt;SPAN&gt;Sum(distinct {&amp;lt;epf={1}&amp;gt;}CashReceived),&lt;/SPAN&gt;&lt;SPAN&gt;PersonTime)))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; -&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; avg({&amp;lt;epf={1},[Year]={$(=&lt;/SPAN&gt;&lt;SPAN&gt;vCurrentYear-1)},[Month]={"&amp;lt;$(&lt;/SPAN&gt;&lt;SPAN&gt;vCurrentMonth)"}&amp;gt;}if(aggr(sum(&lt;/SPAN&gt;&lt;SPAN&gt;Cost),PersonTime)&amp;lt;&amp;gt;0,aggr(&lt;/SPAN&gt;&lt;SPAN&gt;Sum(distinct {&amp;lt;epf={1}&amp;gt;}CashReceived),&lt;/SPAN&gt;&lt;SPAN&gt;PersonTime))))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; avg({&amp;lt;epf={1},[Year]={$(=&lt;/SPAN&gt;&lt;SPAN&gt;vCurrentYear-1)},[Month]={"&amp;lt;$(&lt;/SPAN&gt;&lt;SPAN&gt;vCurrentMonth)"}&amp;gt;}if(aggr(sum(&lt;/SPAN&gt;&lt;SPAN&gt;Cost),PersonTime)&amp;lt;&amp;gt;0,aggr(&lt;/SPAN&gt;&lt;SPAN&gt;Sum(distinct {&amp;lt;epf={1}&amp;gt;}CashReceived),&lt;/SPAN&gt;&lt;SPAN&gt;PersonTime)))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; ,PersonKey))&amp;gt;0&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;,rgb(188,214,235), rgb(199,49,26))&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 15 Nov 2024 23:53:51 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Color-by-Expression-3-if-statements/m-p/1826390#M67953</guid>
      <dc:creator>srl844</dc:creator>
      <dc:date>2024-11-15T23:53:51Z</dc:date>
    </item>
    <item>
      <title>Re: Color by Expression, 3 if statements</title>
      <link>https://community.qlik.com/t5/App-Development/Color-by-Expression-3-if-statements/m-p/1826513#M67960</link>
      <description>&lt;P&gt;Hi, maybe with:&lt;/P&gt;&lt;LI-CODE lang="markup"&gt;if(Alt(avg({&amp;lt;Coached={1}&amp;gt;}
  avg({&amp;lt;epf={1},[Year]={$(=vCurrentYear-1)},[Month]={" 
  &amp;lt;$(vCurrentMonth)"}&amp;gt;}if(aggr(sum(Cost),PersonTime)&amp;lt;&amp;gt;0,aggr(Sum(distinct {&amp;lt;epf={1}&amp;gt;}CashReceived),PersonTime)))
,PersonKey)),0)=0, RGB(color), [YourCurrentIf])&lt;/LI-CODE&gt;</description>
      <pubDate>Wed, 04 Aug 2021 06:26:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Color-by-Expression-3-if-statements/m-p/1826513#M67960</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2021-08-04T06:26:52Z</dc:date>
    </item>
    <item>
      <title>Re: Color by Expression, 3 if statements</title>
      <link>https://community.qlik.com/t5/App-Development/Color-by-Expression-3-if-statements/m-p/1826629#M67981</link>
      <description>&lt;P&gt;Hey Ruben- thanks for this suggestion. Giving this a try, it just turns all of my bars to the new color. I have tried adjusting the new if statement, but it still leaves everything gray. Any additional thoughts? Thanks for help!&lt;/P&gt;</description>
      <pubDate>Wed, 04 Aug 2021 13:27:33 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Color-by-Expression-3-if-statements/m-p/1826629#M67981</guid>
      <dc:creator>srl844</dc:creator>
      <dc:date>2021-08-04T13:27:33Z</dc:date>
    </item>
    <item>
      <title>Re: Color by Expression, 3 if statements</title>
      <link>https://community.qlik.com/t5/App-Development/Color-by-Expression-3-if-statements/m-p/1831306#M68542</link>
      <description>&lt;P&gt;Hi, I was on holidays, you still need help with this or it's already solved?&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 09:02:03 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Color-by-Expression-3-if-statements/m-p/1831306#M68542</guid>
      <dc:creator>rubenmarin</dc:creator>
      <dc:date>2021-08-26T09:02:03Z</dc:date>
    </item>
    <item>
      <title>Re: Color by Expression, 3 if statements</title>
      <link>https://community.qlik.com/t5/App-Development/Color-by-Expression-3-if-statements/m-p/1831383#M68551</link>
      <description>&lt;P&gt;Hey Ruben- Thanks for checking in. This was very close, but did take some tweaking. We were able to solve it though! We ended up just needing to take the denominator and change it to =0&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;avg({&amp;lt;epf={1},[Year]={$(=&lt;/SPAN&gt;&lt;SPAN&gt;vCurrentYear-1)},[Month]={"&amp;lt;$(&lt;/SPAN&gt;&lt;SPAN&gt;vCurrentMonth)"}&amp;gt;}if(aggr(sum(&lt;/SPAN&gt;&lt;SPAN&gt;Cost),PersonTime)&amp;lt;&amp;gt;0,aggr(&lt;/SPAN&gt;&lt;SPAN&gt;Sum(distinct {&amp;lt;epf={1}&amp;gt;}CashReceived),&lt;/SPAN&gt;&lt;SPAN&gt;PersonTime)))&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; ,PersonKey))=0&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 26 Aug 2021 12:35:50 GMT</pubDate>
      <guid>https://community.qlik.com/t5/App-Development/Color-by-Expression-3-if-statements/m-p/1831383#M68551</guid>
      <dc:creator>srl844</dc:creator>
      <dc:date>2021-08-26T12:35:50Z</dc:date>
    </item>
  </channel>
</rss>

