# How to use Metric to display a group of values

**URL:** https://discuss.elastic.co/t/how-to-use-metric-to-display-a-group-of-values/89256
**Category:** Kibana
**Created:** [June 13, 2017, 7:20pm UTC](https://discuss.elastic.co/t/how-to-use-metric-to-display-a-group-of-values/89256 "2017-06-13T19:20:01Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![smlbiobot](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/smlbiobot/32/29622_2.png) [@smlbiobot](https://discuss.elastic.co/u/smlbiobot)
#### Post date: [June 13, 2017, 7:20pm UTC](https://discuss.elastic.co/t/how-to-use-metric-to-display-a-group-of-values/89256/1 "2017-06-13T19:20:01Z")

</div>

I am trying to use Kibana Visualize to do what I normally do with DataDog’s gauges: showing the last known value of a specific variable.

My data looks like this:

 ![](https://us1.discourse-cdn.com/elastic/original/3X/e/c/ec0ebe3f414ebe8a7b701a7f97846b99a696fa6d.png)

What I would like it the Visualize: Metric to do is:

1. Read all the available names from the role\_name column.
2. Display the value in the role\_count column.

But I can’t figure out how I might do that. I also tried to do it with the Data Table but I don’t know how either. Specifically it seems that these tools are trying to look for occurances of rows matching those values, but I want to show the values in the fields.

I realize that I probably can build all the queries manually but that won’t work if the role\_names are not known beforehand — not to mention that it would be a bit messy.

Any help would be appreciated!

---

<div class="post-metadata">

### Author: ![smlbiobot](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/smlbiobot/32/29622_2.png) [@smlbiobot](https://discuss.elastic.co/u/smlbiobot)
#### Post date: [June 13, 2017, 7:25pm UTC](https://discuss.elastic.co/t/how-to-use-metric-to-display-a-group-of-values/89256/2 "2017-06-13T19:25:31Z")

</div>

Ok so I managed to get the Data Table to work now:

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

But I still can’t figure out:

- How to get the Metric to split all rows from the table into its own display.
- How to sort the rows neither alphabetically or by metric. What I in fact need is to sort the rows by the role\_hierarchy\_index seen from my first screenshot above. (number values which show hiearchy in a list)

---

<div class="post-metadata">

### Author: ![spalger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spalger/32/14092_2.png) [@spalger](https://discuss.elastic.co/u/spalger)
#### Post date: [June 14, 2017, 4:33pm UTC](https://discuss.elastic.co/t/how-to-use-metric-to-display-a-group-of-values/89256/3 "2017-06-14T16:33:56Z")

</div>

If you want to split each row into it's own display you might want to use the "metric" visualization type, which renders each bucket as a single number.

I used it below, and setup a custom sorting aggregation for the terms agg based on the `max` of the `role_hierarchy_index` field

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

---

<div class="post-metadata">

### Author: ![smlbiobot](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/smlbiobot/32/29622_2.png) [@smlbiobot](https://discuss.elastic.co/u/smlbiobot)
#### Post date: [June 14, 2017, 4:38pm UTC](https://discuss.elastic.co/t/how-to-use-metric-to-display-a-group-of-values/89256/4 "2017-06-14T16:38:53Z")

</div>

@spalger Thanks that’s what I tried to do but I don’t have the option to aggregate Terms in my options.

 ![](https://us1.discourse-cdn.com/elastic/original/3X/4/3/43a3474a7cd7704e94ae7c069ccb9558bd09d419.png)

I see that you have a panel for Buckets, which I don’t have…

---

<div class="post-metadata">

### Author: ![spalger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spalger/32/14092_2.png) [@spalger](https://discuss.elastic.co/u/spalger)
#### Post date: [June 14, 2017, 4:42pm UTC](https://discuss.elastic.co/t/how-to-use-metric-to-display-a-group-of-values/89256/5 "2017-06-14T16:42:43Z")

</div>

Ah, I'm using an unreleased version of Kibana. Looks like that feature when in with [https://github.com/elastic/kibana/pull/10336](https://github.com/elastic/kibana/pull/10336) which will be shipping soon in 5.5

---

<div class="post-metadata">

### Author: ![smlbiobot](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/smlbiobot/32/29622_2.png) [@smlbiobot](https://discuss.elastic.co/u/smlbiobot)
#### Post date: [June 14, 2017, 5:45pm UTC](https://discuss.elastic.co/t/how-to-use-metric-to-display-a-group-of-values/89256/6 "2017-06-14T17:45:13Z")

</div>

Oh sweet — hopefully soon. This is _exactly_ what I needed. With this new update I can kill datadog completely!

---

<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 12, 2017, 5:45pm UTC](https://discuss.elastic.co/t/how-to-use-metric-to-display-a-group-of-values/89256/7 "2017-07-12T17:45:18Z")

</div>

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