1

I've got this inventory document with the item name and the amount we have on stock. I made a column chart to indicate the current stock. However, when a certain item reached a certain threshold (lets say 5 pieces) I want the column itself change to the color red. How can I do this automatically (i.e. not manually)

For visualization purpose: enter image description here

1

1 Answer 1

4

Create two columns showing "Inventory >= 5" and "Inventory < 5".
Create a "Stacked Column" chart showing "Item", "Inventory >= 5" and "Inventory < 5", writing zero if the condition is not met.

=IF(B2>=5,B2,0)  
=IF(B2<5,B2,0)

Color "Inventory >= 5" blue and "Inventory < 5" red.

Figures:
Final Spreadsheet Final Spreadsheet

Stacked Column
Stacked Column

Chart Source Data
Chart Source Data

1
  • 1
    Good solution-but I'd recommend a minor change. Instead of returning 0, I'd return NA(). That way you can differentiate between no value and a 0 value.
    – dav
    Feb 17, 2017 at 19:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.