7 Replies Latest reply: Dec 12, 2012 9:52 AM by Ahmet Erispaha RSS

    Need help with attribute chart expression (background color)

    Ahmet Erispaha

      I would like to set background color in attribute chart expression of a bar chart so that bars where the expression value is less than the average monthly sales appear in red and the others appear in green.  If I arbitrarily hard code a threshold value like this it works:

      if (sum(Sales)< 50000,red(),green())

       

      But this does not:

      if (sum(Sales)< (sum(Sales)/ count(DISTINCT MonthYear)),red(),green())