6 Replies Latest reply: Jun 10, 2014 4:25 AM by Tresesco B RSS

    Color in bar chart depending on dimension value

      Hi guys!


      I have a bar chart displaying the value of the order and the dimension is the delivery week.

      So, i have on the chart the orders scheduled for week 20, 21, 22... (as you can see in the attached picture).


      Here is the problem!!!


      I want to color differently the bar, depending on the delivery week.

      I explain better. Suppose we are in week 24.

      I would like to:

      1) the bar of previous weeks (23, 22, 21 and behind) are in black color,

      2) the bar of our current week is red,

      3) the bar of future weeks (25, 26, 27...) are in green color.


      I thought to use the color function of the expression but I don't know how to get the x value, i.e. the delivery week.

      Which function should I use?

      Is there a more correct way?


      Hope you can help me!!!

      Thanks in advance!!!