# Conditional statements in data tables

**URL:** https://discuss.elastic.co/t/conditional-statements-in-data-tables/205841
**Category:** Kibana
**Created:** [October 30, 2019, 11:51am UTC](https://discuss.elastic.co/t/conditional-statements-in-data-tables/205841 "2019-10-30T11:51:38Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Amphagory](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/amphagory/32/46127_2.png) [@Amphagory](https://discuss.elastic.co/u/Amphagory)
#### Post date: [October 30, 2019, 11:51am UTC](https://discuss.elastic.co/t/conditional-statements-in-data-tables/205841/1 "2019-10-30T11:51:38Z")

</div>

Say I have a data table that I want to only show data if date range selected is 24 hours or more. If the user selects a data range less than 24 hours, I do not want to show results.

I was wondering if there is conditional statements like the following:

```auto
if (user select data range - 24h) is a positive data range:
    show data
else:
    show 'N/A'

```

Example output for over 24 hours:

```auto
Column1 Column2
Dogs 4
Cats 5

```

Example output for under 24 hours:

```auto
Column1 Column2
Dogs N/A
Cats N/A

```

Alternatively, I guess I can restrict the data range if that is possible....

---

<div class="post-metadata">

### Author: ![mattkime](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mattkime/32/43522_2.png) [@mattkime](https://discuss.elastic.co/u/mattkime)
#### Post date: [November 11, 2019, 9:05pm UTC](https://discuss.elastic.co/t/conditional-statements-in-data-tables/205841/2 "2019-11-11T21:05:16Z")

</div>

There isn't a way to do that but perhaps I can help if you explain the larger problem you're solving. I can't think of another time when someone has wanted to exclude the display of data when data is present in a given time range.

---

<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: [December 9, 2019, 9:05pm UTC](https://discuss.elastic.co/t/conditional-statements-in-data-tables/205841/3 "2019-12-09T21:05:17Z")

</div>

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