<?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: Calculated colors on bubble chart in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Calculated-colors-on-bubble-chart/m-p/378943#M572772</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I added your code, but now all the dots are being colored yellow because it's the else option in the if statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't add the extra expression to calculate the avg(Total Age) because it doesn't give me the option to make it invisible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 17 Aug 2012 22:41:48 GMT</pubDate>
    <dc:creator />
    <dc:date>2012-08-17T22:41:48Z</dc:date>
    <item>
      <title>Calculated colors on bubble chart</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-colors-on-bubble-chart/m-p/378941#M572770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have created a bubble chart which shows a bubble for each patient in a population.&amp;nbsp; The x-axis shows the age of the patient and the y-axis shows their average costs.&amp;nbsp; I've added guide lines to the graphic to split the graph into quadrants.&amp;nbsp; I want to color the bubbles according to which quadrant they are in.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've tried to just use simple calculated colors, like:&lt;/P&gt;&lt;P&gt;if(PMPM &amp;gt;= 2500, red(), green()), and&lt;/P&gt;&lt;P&gt;if(column(2) &amp;gt;= 2500, red(), green())&lt;/P&gt;&lt;P&gt;both of these calculations changed the color of all the bubbles to the else condition, in the above cases green().&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I really want is:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(Age &amp;gt;= avg(All Age) and PMPM &amp;gt;= 2500, red(),&lt;/P&gt;&lt;P&gt;elseif(Age &amp;gt;= avg(All Age) and PMPM &amp;lt; 2500, green(),&lt;/P&gt;&lt;P&gt;elseif(Age &amp;lt; avg(All Age) and PMPM &amp;lt; 2500, blue(),&lt;/P&gt;&lt;P&gt;elseif(Age &amp;lt; avg(All Age) and PMPM &amp;gt;= 2500, yellow())&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG __jive_id="20351" class="jive-image-thumbnail jive-image" onclick="" alt="Capture.PNG" src="https://community.qlik.com/legacyfs/online/20351_Capture.PNG" width="450" /&gt;&lt;/P&gt;&lt;P&gt;THANKS!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Aug 2012 21:37:52 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-colors-on-bubble-chart/m-p/378941#M572770</guid>
      <dc:creator />
      <dc:date>2012-08-17T21:37:52Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated colors on bubble chart</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-colors-on-bubble-chart/m-p/378942#M572771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Boyer.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In first place, you could make a Variable with avg (Total Age), this will improve the calculation time, because it calculates only one time, not for every bubble.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In this case, I will name the variable as vAgeAvg (its contents is =Avg(Total Age).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In Color expression, you could try:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If(Age&amp;gt;=vAgeAvg,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; If(PMPM&amp;gt;=2500, red(), green()),&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(PMPM&amp;gt;=2500, blue(), Yellow())&lt;/P&gt;&lt;P&gt;)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If it isnt the answer you need, please, send a reduced copy for better understanding.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Aug 2012 22:04:49 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-colors-on-bubble-chart/m-p/378942#M572771</guid>
      <dc:creator>sebastiandperei</dc:creator>
      <dc:date>2012-08-17T22:04:49Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated colors on bubble chart</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-colors-on-bubble-chart/m-p/378943#M572772</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I added your code, but now all the dots are being colored yellow because it's the else option in the if statements.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I can't add the extra expression to calculate the avg(Total Age) because it doesn't give me the option to make it invisible.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Aug 2012 22:41:48 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-colors-on-bubble-chart/m-p/378943#M572772</guid>
      <dc:creator />
      <dc:date>2012-08-17T22:41:48Z</dc:date>
    </item>
    <item>
      <title>Re: Calculated colors on bubble chart</title>
      <link>https://community.qlik.com/t5/QlikView/Calculated-colors-on-bubble-chart/m-p/378944#M572773</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Where are you adding the code?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please, in the Expressions Tab, at the first one, click on + symbol, and in Background Color, write the expression. I've tryed in your sample and it works.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What you want to make invisible?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 17 Aug 2012 23:14:25 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Calculated-colors-on-bubble-chart/m-p/378944#M572773</guid>
      <dc:creator>sebastiandperei</dc:creator>
      <dc:date>2012-08-17T23:14:25Z</dc:date>
    </item>
  </channel>
</rss>

