2 Replies Latest reply: Sep 19, 2013 8:21 AM by Sneha Topre RSS

    Calculated color of bars in chart using expression background color and Avg function

      Commonly asked question but the answers to this usually use a specific value, not an avg or other funtion...

       

      I have a simple bar chart and I'd like to color some bars a different color, based on some expression in the background color area in the Expression.

       

      I have a bar chart, Services is the dimension and Cases is the expression. In the expression (background color), I use this calculated color, and it works:

       

      =If (Cases > 597, Color (1), Color(2)

       

      But when I try the following, using Avg, it does not work.

       

      =If (Cases>avg(Cases), Color(1), Color(2))

       

      Seems so simple... any ideas are much appreciated. Thank you -

       

      (note that the red reference line is also set to Avg(Cases)

       

      WT