1 Reply Latest reply: Jun 18, 2018 7:38 AM by Sunny Talwar RSS

    Bar chart color coding help

    Mahitha M

      Hi Experts,

       

      Can any one please help me on below requirement .

      I have applied below color expression in the bar chart for all current year high, low and medium need to show Red, black and grey.

      for all previous year high, low and medium need to show orange, yellow and green.

      =if(Category='Low' and Year=$(=Max(Year)),RGB(0,0,0),

      if(Category='Low' and Year=$(=Max(Year)-1),RGB(255,255,102),

      if(Category='High' and Year=$(=Max(Year)),RGB(255,0,0),

      if(Category='High' and Year=$(=Max(Year)-1),RGB(255,204,153),

      if(Category='Medium' and Year=$(=Max(Year)),RGB(128,128,128),

      if(Category='Medium' and Year=$(=Max(Year)-1),RGB(153,255,153)))))))

       

      But when I have selected 2017 then previous year 2016 color coding not working. Please help me on this.

       

      Thanks in advance.

        • Re: Bar chart color coding help
          Sunny Talwar

          Try this as your expression for color

           

          =Only({1}if(Category='Low' and Year=$(=Max(Year)),RGB(0,0,0),

          if(Category='Low' and Year=$(=Max(Year)-1),RGB(255,255,102),

          if(Category='High' and Year=$(=Max(Year)),RGB(255,0,0),

          if(Category='High' and Year=$(=Max(Year)-1),RGB(255,204,153),

          if(Category='Medium' and Year=$(=Max(Year)),RGB(128,128,128),

          if(Category='Medium' and Year=$(=Max(Year)-1),RGB(153,255,153))))))))

           

          Capture.PNG