# Lens Metric: split by keyword

**URL:** https://discuss.elastic.co/t/lens-metric-split-by-keyword/310755
**Category:** Kibana
**Tags:** lens
**Created:** [July 27, 2022, 1:40pm UTC](https://discuss.elastic.co/t/lens-metric-split-by-keyword/310755 "2022-07-27T13:40:48Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![obi134](https://avatars.discourse-cdn.com/v4/letter/o/c5a1d2/32.png) [@obi134](https://discuss.elastic.co/u/obi134)
#### Post date: [July 27, 2022, 1:40pm UTC](https://discuss.elastic.co/t/lens-metric-split-by-keyword/310755/1 "2022-07-27T13:40:48Z")

</div>

Hi there,  
Currently I am using Metric visualization to show a status of different devices:  
 ![status](https://us1.discourse-cdn.com/elastic/original/3X/9/e/9e678e98596c02be11a43adf62409cb16bdf58f9.jpeg)

In this metric I am showing the last status and split the group by device id. Additionally I defined ranges and selected a color scheme to highlight the background.

The problem is, that we have multiple values across the range, which need the same color. E.g.:  
0x00000000 should be green  
0x00000001 to 0x0000FFFF should be red  
0x00010000 should be yellow  
0x00010001 to 0x0001000F should be red  
0x00010010 should be yellow again  
...

So I need to assign my own colors for each defined range and can't apply a scheme.

I found out, that metric in lens is supporting this in general. But I can't split my values by device id (and creating a visualisation for each device will take too much time) and I can define the color by value for "unique count" but not for "Last value", which would be needed.

Is there any other way?

---

<div class="post-metadata">

### Author: ![Marta\_Bondyra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marta_bondyra/32/102122_2.png) [@Marta\_Bondyra](https://discuss.elastic.co/u/Marta_Bondyra)
#### Post date: [August 12, 2022, 7:39am UTC](https://discuss.elastic.co/t/lens-metric-split-by-keyword/310755/2 "2022-08-12T07:39:36Z")

</div>

Hey there, that would be possible in the next release (new metric visualization that allows breakdown-by), but it's not at the moment. Maybe that a look at legacy metric visualization and see if this one would help?

---

<div class="post-metadata">

### Author: ![obi134](https://avatars.discourse-cdn.com/v4/letter/o/c5a1d2/32.png) [@obi134](https://discuss.elastic.co/u/obi134)
#### Post date: [August 19, 2022, 9:26am UTC](https://discuss.elastic.co/t/lens-metric-split-by-keyword/310755/3 "2022-08-19T09:26:51Z")

</div>

Hey, thank you for your reply. I am currently using the legacy metric, but I would like to use the possibility to define colours per value and this is only supported by the new one.

Is there any release date or roadmap for the "next release" ?

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [September 16, 2022, 9:27am UTC](https://discuss.elastic.co/t/lens-metric-split-by-keyword/310755/4 "2022-09-16T09:27:09Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.

---

<div class="post-metadata">

### Author: ![Marta\_Bondyra](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marta_bondyra/32/102122_2.png) [@Marta\_Bondyra](https://discuss.elastic.co/u/Marta_Bondyra)
#### Post date: [September 29, 2022, 9:17am UTC](https://discuss.elastic.co/t/lens-metric-split-by-keyword/310755/5 "2022-09-29T09:17:43Z")

</div>

Sorry for the late response: the new metric was shipped already in 8.4.
