# How to create this de-duplicated visualization?

**URL:** <https://discuss.elastic.co/t/how-to-create-this-de-duplicated-visualization/111306>\
**Category:** Kibana\
**Created:** [December 12, 2017, 10:50am UTC](https://discuss.elastic.co/t/how-to-create-this-de-duplicated-visualization/111306 "2017-12-12T10:50:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![nicoulaj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nicoulaj/32/25267_2.png) [@nicoulaj](https://discuss.elastic.co/u/nicoulaj)\
**Post date:** [December 12, 2017, 10:50am UTC](https://discuss.elastic.co/t/how-to-create-this-de-duplicated-visualization/111306/1 "2017-12-12T10:50:42Z")

</div>

Hi,  
My index contains the following document type (which represents test executions):

- id of test (string)
- success (boolean)
- version of software

I want to build the following histogram:

- On X axis: versions
- On Y axis: number of unique tests, stacked on success/failure

The same test id can be executed several times on same version with different results: it should be counted as success if it is successful once.

So I tried this setup:

- On X axis: Terms aggregation on "version" field + Split series on "success" field
- On Y axis: Count metric, with aggregation Max Bucket, with Bucket aggregation Terms on field "test id"

This does not work correctly, the tests that have both a success and a failure are counted on both series.

Any idea how to do this ?

---

<div class="post-metadata">

**Author:** ![Brandon\_Kobel](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/brandon_kobel/32/14829_2.png) [@Brandon\_Kobel](https://discuss.elastic.co/u/Brandon_Kobel)\
**Post date:** [December 12, 2017, 5:21pm UTC](https://discuss.elastic.co/t/how-to-create-this-de-duplicated-visualization/111306/2 "2017-12-12T17:21:00Z")

</div>

Hey @nicoulaj excluding the failures based on the successes isn't possible currently in Kibana and requires the bucket script aggregation which we have an enhancement request for [here](https://github.com/elastic/kibana/issues/4707) if you wouldn't mind weighing in with your needs or giving it a "+ 1" it'll help us prioritize appropriately.

---

<div class="post-metadata">

**Author:** ![nicoulaj](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nicoulaj/32/25267_2.png) [@nicoulaj](https://discuss.elastic.co/u/nicoulaj)\
**Post date:** [December 12, 2017, 6:33pm UTC](https://discuss.elastic.co/t/how-to-create-this-de-duplicated-visualization/111306/3 "2017-12-12T18:33:48Z")

</div>

Done, thank you for answering.

---

<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:** [January 9, 2018, 6:33pm UTC](https://discuss.elastic.co/t/how-to-create-this-de-duplicated-visualization/111306/4 "2018-01-09T18:33:51Z")

</div>

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