# Create a data table visualization which excludes false values (Using TopHit)

**URL:** https://discuss.elastic.co/t/create-a-data-table-visualization-which-excludes-false-values-using-tophit/365271
**Category:** Kibana
**Created:** [August 21, 2024, 10:37am UTC](https://discuss.elastic.co/t/create-a-data-table-visualization-which-excludes-false-values-using-tophit/365271 "2024-08-21T10:37:29Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Pinky\_Mary\_Stanly](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/pinky_mary_stanly/32/124424_2.png) [@Pinky\_Mary\_Stanly](https://discuss.elastic.co/u/Pinky_Mary_Stanly)
#### Post date: [August 21, 2024, 10:37am UTC](https://discuss.elastic.co/t/create-a-data-table-visualization-which-excludes-false-values-using-tophit/365271/1 "2024-08-21T10:37:29Z")

</div>

Hi,  
I have a data table visualization in Kibana 7.10.2 where I am displaying No., Name, Status and Time. In my case, for the same 'No.' field, I have many 'Name' and for the same 'Name', I have many 'Status'. And I need to display only the TopHit for all three. The condition to be met is that if the TopHit is false, then the No., Name and Status for that false should not be displayed. But when I give a filter to exclude false values, it will discard the false and display the next true value. What I need is to completely remove the No., Name and Status.

To get the output I have used TopHit of Status and TopHit of Time in Metrics with size 1. In Buckets, I have added No. as the aggregation and Name as the sub-aggregation.

![image](https://us1.discourse-cdn.com/elastic/original/3X/2/b/2bc0d1154fac8e5305c0caba5ed94e85f8df77ba.png)

In the above image, I have given TopHit as 10 to show all the values in Status. My requirement is that when there is a false in the row, the whole row should be excluded even if it has a true later. But when I give a filter to exclude false from the visualization, it deletes only the false value from the row and true is displayed. The required output is as below.

123 abc true,true,true,true Aug 12, 2024 @ 11:05:33  
123 ghi true,true,true,true Aug 12, 2024 @ 15:50:40  
123 jkl true,true,true,true Aug 12, 2024 @ 16:30:39

Thanks.

---

<div class="post-metadata">

### Author: ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)
#### Post date: [February 18, 2025, 1:48pm UTC](https://discuss.elastic.co/t/create-a-data-table-visualization-which-excludes-false-values-using-tophit/365271/2 "2025-02-18T13:48:05Z")

</div>

Hi @Pinky_Mary_Stanly

Kibana 7.10 is a pretty old version.  
I think you could achieve what you are looking for with Runtime fields, a feature available since version 7.15.

The idea:

- create a runtime field with a painless script that "counts" the occurrencies of "false" in your multi values field into a new "hasFalse" field
- now create a Lens configuration with a metric using `Last value` agg and enable the `Show array values` with a filter as `hasFalse: 0`

That should filter out the table as you wish.
