<?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 Background color and Set Analysis in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Background-color-and-Set-Analysis/m-p/457212#M561648</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a chart that uses a Set Analysis (in the expression)&lt;BR /&gt;The backgrounds color should depend on values : &lt;STRONG&gt;if KPI1 &amp;gt; KPI2, then blue, else yellow&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Then, I have to use the same Set Analysis in order to define the color definition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Example : &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;If the expression is : &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;=sum(&lt;STRONG&gt;{$&amp;lt;dProduct={'ProductA'}&amp;gt;}&lt;/STRONG&gt;KPI1)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;the color definition should be :&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;=if(sum(&lt;STRONG&gt;{$&amp;lt;dProduct={'ProductA'}&amp;gt;}&lt;/STRONG&gt;KPI1) &amp;gt; sum(&lt;STRONG&gt;{$&amp;lt;dProduct={'ProductA'}&amp;gt;}&lt;/STRONG&gt;KPI2), blue(), yellow())&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;(I have attached an example)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This behaviour is logical (I have to consider the same set), but it is also very difficult if I want to industrialize the application... because it is not possible to store the color definition into a variable &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Indeed, the color definition could be&amp;nbsp; &lt;BR /&gt;=if(sum(KPI1) &amp;gt; sum(KPI2), blue(), yellow())&lt;BR /&gt;OR&lt;BR /&gt;=if(sum({$&amp;lt;dProduct={'ProductA'}&amp;gt;}KPI1) &amp;gt; sum({$&amp;lt;dProduct={'ProductA'}&amp;gt;}KPI2), blue(), yellow())&lt;BR /&gt;OR &lt;BR /&gt;=if(sum({$&amp;lt;dYear={$(maxYear)}&amp;gt;}KPI1) &amp;gt; sum({$&amp;lt;dYear={$(maxYear)}&amp;gt;}&amp;gt;}KPI2), blue(), yellow())&lt;BR /&gt;and so on... (and my application is much more complicated...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Do you have any idea how to manage this ?&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 19 Mar 2013 16:57:32 GMT</pubDate>
    <dc:creator />
    <dc:date>2013-03-19T16:57:32Z</dc:date>
    <item>
      <title>Background color and Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Background-color-and-Set-Analysis/m-p/457212#M561648</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have created a chart that uses a Set Analysis (in the expression)&lt;BR /&gt;The backgrounds color should depend on values : &lt;STRONG&gt;if KPI1 &amp;gt; KPI2, then blue, else yellow&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Then, I have to use the same Set Analysis in order to define the color definition&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;Example : &lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;If the expression is : &lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;=sum(&lt;STRONG&gt;{$&amp;lt;dProduct={'ProductA'}&amp;gt;}&lt;/STRONG&gt;KPI1)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;the color definition should be :&lt;/EM&gt;&lt;BR /&gt;&lt;EM&gt;=if(sum(&lt;STRONG&gt;{$&amp;lt;dProduct={'ProductA'}&amp;gt;}&lt;/STRONG&gt;KPI1) &amp;gt; sum(&lt;STRONG&gt;{$&amp;lt;dProduct={'ProductA'}&amp;gt;}&lt;/STRONG&gt;KPI2), blue(), yellow())&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;(I have attached an example)&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This behaviour is logical (I have to consider the same set), but it is also very difficult if I want to industrialize the application... because it is not possible to store the color definition into a variable &lt;IMG src="https://community.qlik.com/legacyfs/online/emoticons/sad.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Indeed, the color definition could be&amp;nbsp; &lt;BR /&gt;=if(sum(KPI1) &amp;gt; sum(KPI2), blue(), yellow())&lt;BR /&gt;OR&lt;BR /&gt;=if(sum({$&amp;lt;dProduct={'ProductA'}&amp;gt;}KPI1) &amp;gt; sum({$&amp;lt;dProduct={'ProductA'}&amp;gt;}KPI2), blue(), yellow())&lt;BR /&gt;OR &lt;BR /&gt;=if(sum({$&amp;lt;dYear={$(maxYear)}&amp;gt;}KPI1) &amp;gt; sum({$&amp;lt;dYear={$(maxYear)}&amp;gt;}&amp;gt;}KPI2), blue(), yellow())&lt;BR /&gt;and so on... (and my application is much more complicated...)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Do you have any idea how to manage this ?&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Mar 2013 16:57:32 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Background-color-and-Set-Analysis/m-p/457212#M561648</guid>
      <dc:creator />
      <dc:date>2013-03-19T16:57:32Z</dc:date>
    </item>
    <item>
      <title>Re: Background color and Set Analysis</title>
      <link>https://community.qlik.com/t5/QlikView/Background-color-and-Set-Analysis/m-p/457213#M561649</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;you forgot ")"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;=if(sum(KPI1)&amp;gt;sum(KPI2),blue(), Yellow())&lt;/P&gt;&lt;P&gt;hope that help&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Mar 2013 17:06:56 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Background-color-and-Set-Analysis/m-p/457213#M561649</guid>
      <dc:creator>fdelacal</dc:creator>
      <dc:date>2013-03-19T17:06:56Z</dc:date>
    </item>
  </channel>
</rss>

