13 Replies Latest reply: Apr 4, 2018 10:11 AM by Sunny Talwar RSS

    How do I color bars in a bar chart by expression (number range)?

    Ricky Scheiber

      Hi -

       

      I am trying to color the below bars by expression, trying to go off a set analysis:


      IF(COUNT({< Date=, [Status]={'Value 1'}>}[Tag_ID])>= 20, vRed,vGreen) WHERE vRed and vGreen are color variables.


      For some reason, this set analysis isn't working even though I wrote this expression under "Background Color" for the chart. Ideally, what I would like to see is two Red bars (since these numbers are above 50) and a green third bar. Right now they are all red and this is not right.


      Any advice on this? The expression behind the bar chart itself is:


      =COUNT({<Date=,[Status={'Value 1'}>}[Tag_ID])


      Thanks for your help in advance!


      Ricky