# Search DISTINCT field

**URL:** <https://discuss.elastic.co/t/search-distinct-field/92423>\
**Category:** Kibana\
**Created:** [July 10, 2017, 8:05am UTC](https://discuss.elastic.co/t/search-distinct-field/92423 "2017-07-10T08:05:39Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![xavi23](https://avatars.discourse-cdn.com/v4/letter/x/db5fbb/32.png) [@xavi23](https://discuss.elastic.co/u/xavi23)\
**Post date:** [July 10, 2017, 8:05am UTC](https://discuss.elastic.co/t/search-distinct-field/92423/1 "2017-07-10T08:05:39Z")

</div>

Hello,

I want to load some healthcare data in my index, but i have some problems to visualize the data.

I have some jsons about the same patient, every json have different information but always all json have any fields that never change. Example : Name, birthdate, etc.

How I can to do to create a simple discover using a 'distinct' or similiar filter in the bar search?

Thanks.

---

<div class="post-metadata">

**Author:** ![Stacey\_Gammon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stacey_gammon/32/14025_2.png) [@Stacey\_Gammon](https://discuss.elastic.co/u/Stacey_Gammon)\
**Post date:** [July 10, 2017, 4:07pm UTC](https://discuss.elastic.co/t/search-distinct-field/92423/2 "2017-07-10T16:07:19Z")

</div>

You can do this by creating a Data Table Visualization and splitting on the field you wish to see the unique values for.

e.g.:

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

You can add sub buckets for additional columns.

---

<div class="post-metadata">

**Author:** ![xavi23](https://avatars.discourse-cdn.com/v4/letter/x/db5fbb/32.png) [@xavi23](https://discuss.elastic.co/u/xavi23)\
**Post date:** [July 11, 2017, 6:48am UTC](https://discuss.elastic.co/t/search-distinct-field/92423/3 "2017-07-11T06:48:04Z")

</div>

Thanks Stacey,

But the agregation no will resolve my problem because I don't like see the count field, unless that I can remove the count field ?

---

<div class="post-metadata">

**Author:** ![Stacey\_Gammon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stacey_gammon/32/14025_2.png) [@Stacey\_Gammon](https://discuss.elastic.co/u/Stacey_Gammon)\
**Post date:** [July 11, 2017, 1:53pm UTC](https://discuss.elastic.co/t/search-distinct-field/92423/4 "2017-07-11T13:53:34Z")

</div>

Hmm, it would be nice if you could get rid of the count column, but you can't. You can however change it to something else, but it looks like the only fields you can replace with are numeric fields. If you have a numeric field that doesn't change document to document and is numeric, then you could use `max`, `min`, or `top hit` to replace the count column with.

 ![](https://us1.discourse-cdn.com/elastic/original/3X/8/8/88e807f20bfef54e2b0f18a17b92aa919d72d6c1.png)

Unfortunately it does look like you have to select at least one metric column though.

---

<div class="post-metadata">

**Author:** ![xavi23](https://avatars.discourse-cdn.com/v4/letter/x/db5fbb/32.png) [@xavi23](https://discuss.elastic.co/u/xavi23)\
**Post date:** [July 12, 2017, 7:18am UTC](https://discuss.elastic.co/t/search-distinct-field/92423/5 "2017-07-12T07:18:28Z")

</div>

Thanks, don't worry, finally I was find a way to load my data without duplicate the data.

---

<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 9, 2017, 7:18am UTC](https://discuss.elastic.co/t/search-distinct-field/92423/6 "2017-08-09T07:18:51Z")

</div>

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