# Is posible make this?

**URL:** https://discuss.elastic.co/t/is-posible-make-this/175973
**Category:** Kibana
**Created:** [April 9, 2019, 7:49am UTC](https://discuss.elastic.co/t/is-posible-make-this/175973 "2019-04-09T07:49:04Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Jaime\_Teixido](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jaime_teixido/32/43753_2.png) [@Jaime\_Teixido](https://discuss.elastic.co/u/Jaime_Teixido)
#### Post date: [April 9, 2019, 7:49am UTC](https://discuss.elastic.co/t/is-posible-make-this/175973/1 "2019-04-09T07:49:05Z")

</div>

Hi,

> {  
> "id":121212121221,  
> "type":1,  
> "text":test,  
> "timestamp":2019-04-09 9:47:304  
> }

I want to create a pie chart that filters by a type and tells me the number of texts, taking into account that only 1 can be counted by id and that it must be the highest date.

I'm not sure it's very clear, if you need more information request it.

Thank you.

---

<div class="post-metadata">

### Author: ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)
#### Post date: [April 12, 2019, 10:17am UTC](https://discuss.elastic.co/t/is-posible-make-this/175973/2 "2019-04-12T10:17:10Z")

</div>

From what I can understand you want a metric, not a pie chart as you're only trying to find 1 number.  
So a cardinality metric on the ID field (will count the unique IDs) with a filter in the bar for type, that should be it.  
Or if you want to show for all types, split by type, a Pie Chart would work, with the same cardinality metric and a split by Terms on the type field.

---

<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: [May 10, 2019, 10:17am UTC](https://discuss.elastic.co/t/is-posible-make-this/175973/3 "2019-05-10T10:17:17Z")

</div>

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