3 Replies Latest reply: Aug 17, 2012 7:14 PM by Sebastian Pereira RSS

    Calculated colors on bubble chart

    Jeremy Boyer

      I have created a bubble chart which shows a bubble for each patient in a population.  The x-axis shows the age of the patient and the y-axis shows their average costs.  I've added guide lines to the graphic to split the graph into quadrants.  I want to color the bubbles according to which quadrant they are in.

       

      I've tried to just use simple calculated colors, like:

      if(PMPM >= 2500, red(), green()), and

      if(column(2) >= 2500, red(), green())

      both of these calculations changed the color of all the bubbles to the else condition, in the above cases green().

       

      What I really want is:

            if(Age >= avg(All Age) and PMPM >= 2500, red(),

      elseif(Age >= avg(All Age) and PMPM < 2500, green(),

      elseif(Age < avg(All Age) and PMPM < 2500, blue(),

      elseif(Age < avg(All Age) and PMPM >= 2500, yellow())

       

       

      Capture.PNG

      THANKS!