<?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 Complicated color definition in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Complicated-color-definition/m-p/199213#M58232</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe i'm missing something but if you graph is just showing a breakdown between Local, Medical, and National and you select National, wouldn't the whole graph be only National and just one color?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe you can post some code, or maybe i'm just missing something.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 05 Apr 2011 21:44:59 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-04-05T21:44:59Z</dc:date>
    <item>
      <title>Complicated color definition</title>
      <link>https://community.qlik.com/t5/QlikView/Complicated-color-definition/m-p/199212#M58231</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Everyone,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have the following chart:&lt;/P&gt;&lt;P&gt;&lt;IMG alt="error loading image" class="jive-image error-loading-image" src="https://community.qlik.com/legacyfs/online/-4017_sourceID:4017" /&gt;&lt;/P&gt;&lt;P&gt;I have defined the colors using the folowing in background color:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;&lt;BR /&gt;&lt;BR /&gt;=if(SOURCE_CATEGORY='Local', rgb(0,77,141)&lt;BR /&gt; ,if(SOURCE_CATEGORY='National', RGB(141,0,77)&lt;BR /&gt; ,IF(SOURCE_CATEGORY='Medical', RGB(77,141,0))))&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;This is working great. Here's the problem. This chart has a set analysis statement so that it acts independently of the field that defines these categories:&lt;/P&gt;&lt;P&gt;e.g.&lt;/P&gt;&lt;PRE ___default_attr="plain" class="jive_text_macro jive_macro_code" jivemacro="code"&gt;{&amp;lt;category=&amp;gt;}&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;So when I select one of these categories in a list box (which I need to be able to do for other charts on the sheet) the colors of the non-selected pies changes! For example, if I select 'National', the National pie segment remains the correct color but the other two change to random colors.&lt;/P&gt;&lt;P&gt;Any ideas? Persistent colors is checked in the settings.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Gareth&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Apr 2011 21:13:05 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Complicated-color-definition/m-p/199212#M58231</guid>
      <dc:creator />
      <dc:date>2011-04-05T21:13:05Z</dc:date>
    </item>
    <item>
      <title>Complicated color definition</title>
      <link>https://community.qlik.com/t5/QlikView/Complicated-color-definition/m-p/199213#M58232</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Maybe i'm missing something but if you graph is just showing a breakdown between Local, Medical, and National and you select National, wouldn't the whole graph be only National and just one color?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Maybe you can post some code, or maybe i'm just missing something.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Apr 2011 21:44:59 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Complicated-color-definition/m-p/199213#M58232</guid>
      <dc:creator />
      <dc:date>2011-04-05T21:44:59Z</dc:date>
    </item>
    <item>
      <title>Complicated color definition</title>
      <link>https://community.qlik.com/t5/QlikView/Complicated-color-definition/m-p/199214#M58233</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="jive_text_macro jive_macro_quote" jivemacro="quote"&gt;&lt;BR /&gt;moshea444 wrote:Maybe i'm missing something but if you graph is just showing a breakdown between Local, Medical, and National and you select National, wouldn't the whole graph be only National and just one color?&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt; &lt;P&gt;If I understand correctly, the graph is intended to ignore the selection of 'National' and continue displaying all three. The problem is that when 'National' is selected, the other values don't get the right color.&lt;/P&gt;&lt;P&gt;I was able to duplicate and work around the problem in v9 SR6. Try this for the color expression.&lt;/P&gt;&lt;P style="padding-left:30px;"&gt;pick(match(only({1} SOURCE_CATEGORY)&lt;BR /&gt; ,'Local' ,'National' ,'Medical')&lt;BR /&gt; ,rgb(0,77,141),rgb(141,0,77),rgb(77,141,0))&lt;/P&gt;&lt;P&gt;I didn't duplicate the EXACT situation, so I could have a syntax or other error. But the idea is that you use only({1}...) to force the expression to recognize even unselected categories.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Apr 2011 23:59:13 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Complicated-color-definition/m-p/199214#M58233</guid>
      <dc:creator>johnw</dc:creator>
      <dc:date>2011-04-05T23:59:13Z</dc:date>
    </item>
    <item>
      <title>Complicated color definition</title>
      <link>https://community.qlik.com/t5/QlikView/Complicated-color-definition/m-p/199215#M58234</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Ah John thanks again for your help on these forums. This worked perfectly!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 06 Apr 2011 08:19:23 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Complicated-color-definition/m-p/199215#M58234</guid>
      <dc:creator />
      <dc:date>2011-04-06T08:19:23Z</dc:date>
    </item>
  </channel>
</rss>

