# Lens is showing lines without values

**URL:** https://discuss.elastic.co/t/lens-is-showing-lines-without-values/338702
**Category:** Kibana
**Tags:** lens
**Created:** [July 18, 2023, 4:37pm UTC](https://discuss.elastic.co/t/lens-is-showing-lines-without-values/338702 "2023-07-18T16:37:33Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![johngregg](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@johngregg](https://discuss.elastic.co/u/johngregg)
#### Post date: [July 18, 2023, 4:37pm UTC](https://discuss.elastic.co/t/lens-is-showing-lines-without-values/338702/1 "2023-07-18T16:37:33Z")

</div>

I have a lens that I'm using to show custom metrics from Elastic APM, like jvm.jmx.banana. I haven't found good docs explaining breakdown, but it appears to be similar to the SQL "group by" clause, which is what I want.

I'm using the breakdown to separate the lines on the graph by service.node.name and labels.name or labels.type, which are two values created for any custom JMX metric. However my graph is showing lines for service.node.name+labels.name for documents that don't have my selected metric at all but do have service.node.name and labels.name. For example, some Java memory and GC metrics have labels.name, so there is a line on the graph for them, even if they don't have the metric I'm trying to visualize.

I want to exclude docs that don't have the metric I'm trying to graph. There is checkbox for "Include documents without the selected field" but it's deselected.

thanks

---

<div class="post-metadata">

### Author: ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)
#### Post date: [July 18, 2023, 4:48pm UTC](https://discuss.elastic.co/t/lens-is-showing-lines-without-values/338702/2 "2023-07-18T16:48:36Z")

</div>

Hi @johngregg

Are you able to share an example of what you are looking to achieve?

> However my graph is showing lines for service.node.name+labels.name for documents that don't have my selected metric at all but do have service.node.name and labels.name.

That does not sound correct.

---

<div class="post-metadata">

### Author: ![johngregg](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@johngregg](https://discuss.elastic.co/u/johngregg)
#### Post date: [July 18, 2023, 4:59pm UTC](https://discuss.elastic.co/t/lens-is-showing-lines-without-values/338702/3 "2023-07-18T16:59:42Z")

</div>

LOL, it doesn't sound correct to me, either.

Collapsed for easier reading, a common doc with java GC data looks like this:

```auto
{
  "service.node.name":"myappnode1",
  "jvm.gc.count":42,
  "labels.name":"G1 Young Generation"
}

```

My custom JMX doc looks like this:

```auto
{
  "service.node.name":"myappnode1",
  "jvm.jmx.banana":99,
  "labels.name":"mymbeanname"
}

```

I want my graph to show one line of jvm.jmx.banana for each service.node.name/labels.name combination: "myappnode1 mymbeanname," "myappnode2 mymbeanname," etc.

But the legend also shows "myappnode1 G1 Young Generation," "myappnode2 G1 Young Generation," etc. The GC docs don't have jvm.jmx.banana, so I don't want them to display.

thanks

---

<div class="post-metadata">

### Author: ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)
#### Post date: [July 19, 2023, 6:43am UTC](https://discuss.elastic.co/t/lens-is-showing-lines-without-values/338702/4 "2023-07-19T06:43:50Z")

</div>

Ah ok, I see now.  
Then you probably need to define a filter with `jvm.jmx.banana: *` which ensures to filter for the visualization only documents that have the `jvm.jmx.banana` property defined.

---

<div class="post-metadata">

### Author: ![johngregg](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@johngregg](https://discuss.elastic.co/u/johngregg)
#### Post date: [July 19, 2023, 3:15pm UTC](https://discuss.elastic.co/t/lens-is-showing-lines-without-values/338702/5 "2023-07-19T15:15:24Z")

</div>

Thanks. That did work but it seems that should happen automatically. If I say I want to display x, why would the graph consider docs that don't contain x?

---

<div class="post-metadata">

### Author: ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)
#### Post date: [July 19, 2023, 3:32pm UTC](https://discuss.elastic.co/t/lens-is-showing-lines-without-values/338702/6 "2023-07-19T15:32:50Z")

</div>

I would say that this can be better explained but I think it is fair to not make "smart" assumptions about data when searching/aggregating, rather provide the user the ability to control its search flow.  
Providing the power to the user to decide, like applying a filter in this case, makes it possible to have full control over the data analysis.

---

<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: [August 16, 2023, 3:33pm UTC](https://discuss.elastic.co/t/lens-is-showing-lines-without-values/338702/7 "2023-08-16T15:33:36Z")

</div>

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