# Help changing y axis on kibana lenses

**URL:** <https://discuss.elastic.co/t/help-changing-y-axis-on-kibana-lenses/276196>\
**Category:** Kibana\
**Tags:** fleet, lens\
**Created:** [June 16, 2021, 8:39pm UTC](https://discuss.elastic.co/t/help-changing-y-axis-on-kibana-lenses/276196 "2021-06-16T20:39:20Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jason2073](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@Jason2073](https://discuss.elastic.co/u/Jason2073)\
**Post date:** [June 16, 2021, 8:39pm UTC](https://discuss.elastic.co/t/help-changing-y-axis-on-kibana-lenses/276196/1 "2021-06-16T20:39:20Z")

</div>

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

I can't seem to use any variable other than Records, and meta fields for the Y axis of a line or area graph. I am struggling to find a guide on whats wrong or other people with a similar issue. Ideally I want the y axis to be the number of unique ip's for that given timestamp, I have the variable for the ip (its type keyword / string) , and it is populated but im not sure what im doing wrong when i try to use it as a y axis.

---

<div class="post-metadata">

**Author:** ![wylie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wylie/32/81794_2.png) [@wylie](https://discuss.elastic.co/u/wylie)\
**Post date:** [June 16, 2021, 8:57pm UTC](https://discuss.elastic.co/t/help-changing-y-axis-on-kibana-lenses/276196/2 "2021-06-16T20:57:27Z")

</div>

It looks like you might be using a Kibana index pattern that is missing fields, but it's very difficult to tell from just the one screenshot. Here are some pieces of information that are needed:

1. Which version of Kibana are you using?
2. If you go to the Management \> Index pattern screen for this index pattern, does it accurately show the fields you care about? Are they `aggregatable`, which is required for Lens?
3. If you are accurately seeing the fields in your index pattern, but not in Lens, I think we'll need more information about what exactly your index pattern contains.

---

<div class="post-metadata">

**Author:** ![Jason2073](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@Jason2073](https://discuss.elastic.co/u/Jason2073)\
**Post date:** [June 17, 2021, 4:45pm UTC](https://discuss.elastic.co/t/help-changing-y-axis-on-kibana-lenses/276196/3 "2021-06-17T16:45:08Z")

</div>

Thank you for the response, I wasn't sure what to include.  
-The kibana version is 7.11.1

- The index pattern screen does show the field I want to use for the y axis, and it is aggregatable  

- The index pattern is an hourly rollup of an index that is updated every 10 minutes. the fields are mapped using dynamic runtime mapping if that is relevant?

If I can include any other information that would help let me know, Thank you agian.

---

<div class="post-metadata">

**Author:** ![wylie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wylie/32/81794_2.png) [@wylie](https://discuss.elastic.co/u/wylie)\
**Post date:** [June 17, 2021, 5:03pm UTC](https://discuss.elastic.co/t/help-changing-y-axis-on-kibana-lenses/276196/4 "2021-06-17T17:03:47Z")

</div>

Are you sure that you're looking at the same index pattern in both places? What does Lens show on the left and right side index pattern selector?

---

<div class="post-metadata">

**Author:** ![Jason2073](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@Jason2073](https://discuss.elastic.co/u/Jason2073)\
**Post date:** [June 17, 2021, 5:18pm UTC](https://discuss.elastic.co/t/help-changing-y-axis-on-kibana-lenses/276196/5 "2021-06-17T17:18:53Z")

</div>

Im sure it's the same index pattern, I just remade the rollup job and added some metric fields and i can now see those as options for y axis, but I wasn't able to add the field I wanted. It seems that only numeric fields are allowed as metrics. Is there a way to use strings for this? We have a string identifier and It would be great to have a way of just counting the number of unique keywords

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

---

<div class="post-metadata">

**Author:** ![wylie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wylie/32/81794_2.png) [@wylie](https://discuss.elastic.co/u/wylie)\
**Post date:** [June 17, 2021, 5:38pm UTC](https://discuss.elastic.co/t/help-changing-y-axis-on-kibana-lenses/276196/6 "2021-06-17T17:38:30Z")

</div>

You can use the Unique Count function to get the unique keywords.

---

<div class="post-metadata">

**Author:** ![Jason2073](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@Jason2073](https://discuss.elastic.co/u/Jason2073)\
**Post date:** [June 17, 2021, 6:13pm UTC](https://discuss.elastic.co/t/help-changing-y-axis-on-kibana-lenses/276196/7 "2021-06-17T18:13:03Z")

</div>

Sorry if im missing something obvious, but from what ive seen only numeric fields are able to be selected under unique count. The fields that I can now see I added on this page, but they are all numeric only.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/c/9/c92d4b5851d0c115e0749b54c888c1d3b50a6b06.png)  
if I try and add a new metric field i see this:  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/4/9472467f6c52568d6136c3f9812c2c2d0f9bee8c.png)  
and the field i want to do a unique count of is not there.

I want to do a unique count on a keyword like you said, but there's either an issue with how im setting the metrics or seeing what is available for options on a unique count.

---

<div class="post-metadata">

**Author:** ![wylie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/wylie/32/81794_2.png) [@wylie](https://discuss.elastic.co/u/wylie)\
**Post date:** [June 17, 2021, 6:35pm UTC](https://discuss.elastic.co/t/help-changing-y-axis-on-kibana-lenses/276196/8 "2021-06-17T18:35:56Z")

</div>

Oh, this is a rollup index? Those are much more restricted than regular indices. [The cardinality metric is not supported on rollups.](https://www.elastic.co/guide/en/elasticsearch/reference/current/rollup-agg-limitations.html)

---

<div class="post-metadata">

**Author:** ![Jason2073](https://avatars.discourse-cdn.com/v4/letter/j/4bbf92/32.png) [@Jason2073](https://discuss.elastic.co/u/Jason2073)\
**Post date:** [June 17, 2021, 8:00pm UTC](https://discuss.elastic.co/t/help-changing-y-axis-on-kibana-lenses/276196/9 "2021-06-17T20:00:43Z")

</div>

Ah thats what's wrong, Thank you for your patience with me, you've been great.

---

<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:** [July 15, 2021, 8:01pm UTC](https://discuss.elastic.co/t/help-changing-y-axis-on-kibana-lenses/276196/10 "2021-07-15T20:01:25Z")

</div>

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