# Custom time for Kibana count() formula

**URL:** https://discuss.elastic.co/t/custom-time-for-kibana-count-formula/308302
**Category:** Kibana
**Created:** [June 28, 2022, 1:42am UTC](https://discuss.elastic.co/t/custom-time-for-kibana-count-formula/308302 "2022-06-28T01:42:23Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![ABHISHEK\_NEGI](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abhishek_negi/32/107642_2.png) [@ABHISHEK\_NEGI](https://discuss.elastic.co/u/ABHISHEK_NEGI)
#### Post date: [June 28, 2022, 1:42am UTC](https://discuss.elastic.co/t/custom-time-for-kibana-count-formula/308302/1 "2022-06-28T01:42:23Z")

</div>

Hi,

i want to set custom time range for kibana while creating bar chart. so in vertical axis i selected count --\> advance option --\> time shift but it has only assigned time.  
then i went to the formula section and i tried multiple thing but was not able to get the data from start of the day.

for eg - today is 27Jun so i want data from 27 Jun, 00.00AM till now.  
How to set the formula for this in count. please help.

thanks in advance.

---

<div class="post-metadata">

### Author: ![flash1293](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/flash1293/32/41227_2.png) [@flash1293](https://discuss.elastic.co/u/flash1293)
#### Post date: [June 28, 2022, 8:58am UTC](https://discuss.elastic.co/t/custom-time-for-kibana-count-formula/308302/2 "2022-06-28T08:58:20Z")

</div>

When you are adding the visualization to the dashboard, you can configure a custom time range for the panel there. Does this solve your use case?

---

<div class="post-metadata">

### Author: ![ABHISHEK\_NEGI](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/abhishek_negi/32/107642_2.png) [@ABHISHEK\_NEGI](https://discuss.elastic.co/u/ABHISHEK_NEGI)
#### Post date: [June 29, 2022, 11:25pm UTC](https://discuss.elastic.co/t/custom-time-for-kibana-count-formula/308302/3 "2022-06-29T23:25:08Z")

</div>

yes but how to set custom time for starting of the day till now.  
how should i define it ?

---

<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: [July 27, 2022, 11:25pm UTC](https://discuss.elastic.co/t/custom-time-for-kibana-count-formula/308302/4 "2022-07-27T23:25:25Z")

</div>

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