# Conditional color change in Metric Widget

**URL:** <https://discuss.elastic.co/t/conditional-color-change-in-metric-widget/120327>\
**Category:** Kibana\
**Created:** [February 17, 2018, 11:16pm UTC](https://discuss.elastic.co/t/conditional-color-change-in-metric-widget/120327 "2018-02-17T23:16:05Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![LeeDr](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leedr/32/9289_2.png) [@LeeDr](https://discuss.elastic.co/u/LeeDr)\
**Post date:** [February 22, 2018, 2:51pm UTC](https://discuss.elastic.co/t/conditional-color-change-in-metric-widget/120327/3 "2018-02-22T14:51:46Z")

</div>

Here's an example where I set the conditional formatting of my `@tags` field so that `success` is green, and `info` is blue;

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/0/f/0f033fefca0030e3757a49782a6bcd5d6e5c57d7.png)

And here in Discover I can see a green `success` value;

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/8/3/83c51a7669ae9e0064ec8917c93d2e6382bc1f45.png)

And this works in at least some visualizations like this Data Table (but note that for Discover I had to set the color conditional for the analyzed `@tags` field and for Visualizations I had to set the same color conditional formatting on the `@tags.raw` field);

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/2/0/2060fd8637f46fbed38a2b9b7ac599b03d52aa9f.png)

---

_[View the full topic](https://discuss.elastic.co/t/conditional-color-change-in-metric-widget/120327)._
