4 Replies Latest reply on Dec 19, 2016 9:23 PM by Mohammad Said

Highlighting (color coding) a bar chart

Hi folks.

Need some advice on highlighting (or color coding) bar charts according to highest or lowest value. For example, I want the highest (or max value) to be highlighted in green while the lowest (min value) in red. The remaining bars can remain blue in colour.

Have tried using filters and Max/Min formula but it does not give the expected result. There is another way of doing it by sorting them. However, it is something that we do not want. We just want to see by its original view (the max and min colours come automatically). Appreciate if anyone can share some tips and tricks to achieving the above.

• 1. Re: Highlighting (color coding) a bar chart

Use WINDOW_MAX and WINDOW_MIN to get the min and max values.

Have a calc:

If SUM([whatever makes the bars]) = WINDOW_MAX(SUM([whatever makes the bars]) then "MAX"

ELSEIF SUM([whatever makes the bars]) = WINDOW_MIN(SUM([whatever makes the bars]) then "MIN"

ELSE "Others"

END

Put that calc on the colors shelf.  You'll be able to set colors for MAX, MIN and Others

1 of 1 people found this helpful
• 2. Re: Highlighting (color coding) a bar chart

Hi,

try this,

IF SUM([Sales])=WINDOW_MAX(SUM([Sales])) THEN 1 //1-Green

ELSEIF SUM([Sales])=WINDOW_MIN(SUM([Sales])) THEN 2 //2-Red

ELSE 0 END  //0-Blue

Let me know If this help.

Mahfooj

1 of 1 people found this helpful
• 3. Re: Highlighting (color coding) a bar chart

Hi Joe.

Thank you for sharing the solution. Your suggestion works perfectly!!

Thanks again.

Cheers.

• 4. Re: Highlighting (color coding) a bar chart

Thank you for your suggestion Mahfooj. Have tried Joe's suggestion and it works. I can see yours work well too.

Will give it a try.

Thanks for the help :-)