# Kibana Time filter quick ranges for shifts

**URL:** <https://discuss.elastic.co/t/kibana-time-filter-quick-ranges-for-shifts/241994>\
**Category:** Kibana\
**Created:** [July 21, 2020, 9:33am UTC](https://discuss.elastic.co/t/kibana-time-filter-quick-ranges-for-shifts/241994 "2020-07-21T09:33:12Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![gruselglatz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gruselglatz/32/42675_2.png) [@gruselglatz](https://discuss.elastic.co/u/gruselglatz)\
**Post date:** [July 21, 2020, 9:33am UTC](https://discuss.elastic.co/t/kibana-time-filter-quick-ranges-for-shifts/241994/1 "2020-07-21T09:33:12Z")

</div>

Hi,

I didnt found anything on the web to solve my problem. Is it possible to define a Range in Kibana Settings to Define the following 3 Shifts?

Morning Shift (F), from 6–14 ,  
Evening Shift (S), from 14–22 ,  
Night Shift (N), from 22–6 .

I get it to set it here in the advanced settings. But I dont know how to define the to-from values:

```
  {
    "from": "now/d",
    "to": "now/d",
    "display": "Nachtschicht"
  },
  {
    "from": "now/d",
    "to": "now/d",
    "display": "Frühschicht"
  },
  {
    "from": "now/d",
    "to": "now/d",
    "display": "Spätschicht"
  },

```

Thx in advance!

---

<div class="post-metadata">

**Author:** ![AClerk](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/aclerk/32/55297_2.png) [@AClerk](https://discuss.elastic.co/u/AClerk)\
**Post date:** [July 22, 2020, 4:11am UTC](https://discuss.elastic.co/t/kibana-time-filter-quick-ranges-for-shifts/241994/2 "2020-07-22T04:11:00Z")

</div>

Does this work for you?

```auto
 {
    "from": "now/d + 6h",
    "to": "now/d + 14h",
    "display": "Nachtschicht"
  },
  {
    "from": "now/d + 14h",
    "to": "now/d + 22h",
    "display": "Frühschicht"
  },

```

The last one is tricky as it requires a condition.  
depends if the filter applied before midnight or after.

I would create a scripted field which calculates the shifts.  
e.g.  
morning shift = 1  
day shift = 2  
night shift = 3  
Then just filter by the field.

---

<div class="post-metadata">

**Author:** ![gruselglatz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/gruselglatz/32/42675_2.png) [@gruselglatz](https://discuss.elastic.co/u/gruselglatz)\
**Post date:** [July 22, 2020, 6:04am UTC](https://discuss.elastic.co/t/kibana-time-filter-quick-ranges-for-shifts/241994/3 "2020-07-22T06:04:14Z")

</div>

@AClerk unfurtunatly it's killing kibana completly. I get this message:

> [$rootScope:infdig] 10 $digest() iterations reached. Aborting! Watchers fired in the last 5 iterations: [[{"msg":"fn: r","newVal":"Jul 22, 2020 @ 08:01:50.559","oldVal":"Jul 22, 2020 @ 08:01:50.558"},{"msg":"fn: r","newVal":"Jul 22, 2020 @ 08:01:50.559","oldVal":"Jul 22, 2020 @ 08:01:50.558"}],[{"msg":"fn: r","newVal":"Jul 22, 2020 @ 08:01:50.561","oldVal":"Jul 22, 2020 @ 08:01:50.559"},{"msg":"fn: r","newVal":"Jul 22, 2020 @ 08:01:50.561","oldVal":"Jul 22, 2020 @ 08:01:50.559"}],[{"msg":"fn: r","newVal":"Jul 22, 2020 @ 08:01:50.562","oldVal":"Jul 22, 2020 @ 08:01:50.561"},{"msg":"fn: r","newVal":"Jul 22, 2020 @ 08:01:50.562","oldVal":"Jul 22, 2020 @ 08:01:50.561"}],[{"msg":"fn: r","newVal":"Jul 22, 2020 @ 08:01:50.564","oldVal":"Jul 22, 2020 @ 08:01:50.562"},{"msg":"fn: r","newVal":"Jul 22, 2020 @ 08:01:50.564","oldVal":"Jul 22, 2020 @ 08:01:50.562"}],[{"msg":"fn: r","newVal":"Jul 22, 2020 @ 08:01:50.567","oldVal":"Jul 22, 2020 @ 08:01:50.564"},{"msg":"fn: r","newVal":"Jul 22, 2020 @ 08:01:50.568","oldVal":"Jul 22, 2020 @ 08:01:50.564"}]] [AngularJS](https://errors.angularjs.org/1.7.9/$rootScope/infdig?p0=10&p1=%5B%5B%7B%22msg%22%3A%22fn%3A%20r%22%2C%22newVal%22%3A%22Jul%2022%2C%202020%20%40%2008%3A01%3A50.559%22%2C%22oldVal%22%3A%22Jul%2022%2C%202020%20%40%2008%3A01%3A50.558%22%7D%2C%7B%22msg%22%3A%22fn%3A%20r%22%2C%22newVal%22%3A%22Jul%2022%2C%202020%20%40%2008%3A01%3A50.559%22%2C%22oldVal%22%3A%22Jul%2022%2C%202020%20%40%2008%3A01%3A50.558%22%7D%5D%2C%5B%7B%22msg%22%3A%22fn%3A%20r%22%2C%22newVal%22%3A%22Jul%2022%2C%202020%20%40%2008%3A01%3A50.561%22%2C%22oldVal%22%3A%22Jul%2022%2C%202020%20%40%2008%3A01%3A50.559%22%7D%2C%7B%22msg%22%3A%22fn%3A%20r%22%2C%22newVal%22%3A%22Jul%2022%2C%202020%20%40%2008%3A01%3A50.561%22%2C%22oldVal%22%3A%22Jul%2022%2C%202020%20%40%2008%3A01%3A50.559%22%7D%5D%2C%5B%7B%22msg%22%3A%22fn%3A%20r%22%2C%22newVal%22%3A%22Jul%2022%2C%202020%20%40%2008%3A01%3A50.562%22%2C%22oldVal%22%3A%22Jul%2022%2C%202020%20%40%2008%3A01%3A50.561%22%7D%2C%7B%22msg%22%3A%22fn%3A%20r%22%2C%22newVal%22%3A%22Jul%2022%2C%202020%20%40%2008%3A01%3A50.562%22%2C%22oldVal%22%3A%22Jul%2022%2C%202020%20%40%2008%3A01%3A50.561%22%7D%5D%2C%5B%7B%22msg%22%3A%22fn%3A%20r%22%2C%22newVal%22%3A%22Jul%2022%2C%202020%20%40%2008%3A01%3A50.564%22%2C%22oldVal%22%3A%22Jul%2022%2C%202020%20%40%2008%3A01%3A50.562%22%7D%2C%7B%22msg%22%3A%22fn%3A%20r%22%2C%22newVal%22%3A%22Jul%2022%2C%202020%20%40%2008%3A01%3A50.564%22%2C%22oldVal%22%3A%22Jul%2022%2C%202020%20%40%2008%3A01%3A50.562%22%7D%5D%2C%5B%7B%22msg%22%3A%22fn%3A%20r%22%2C%22newVal%22%3A%22Jul%2022%2C%202020%20%40%2008%3A01%3A50.567%22%2C%22oldVal%22%3A%22Jul%2022%2C%202020%20%40%2008%3A01%3A50.564%22%7D%2C%7B%22msg%22%3A%22fn%3A%20r%22%2C%22newVal%22%3A%22Jul%2022%2C%202020%20%40%2008%3A01%3A50.568%22%2C%22oldVal%22%3A%22Jul%2022%2C%202020%20%40%2008%3A01%3A50.564%22%7D%5D%5D)

```auto
Version: 7.7.1
Build: 30896
Error: [$rootScope:infdig] 10 $digest() iterations reached. Aborting!
Watchers fired in the last 5 iterations: [[{"msg":"fn: r","newVal":"Jul 22, 2020 @ 08:01:50.559","oldVal":"Jul 22, 2020 @ 08:01:50.558"},{"msg":"fn: r","newVal":"Jul 22, 2020 @ 08:01:50.559","oldVal":"Jul 22, 2020 @ 08:01:50.558"}],[{"msg":"fn: r","newVal":"Jul 22, 2020 @ 08:01:50.561","oldVal":"Jul 22, 2020 @ 08:01:50.559"},{"msg":"fn: r","newVal":"Jul 22, 2020 @ 08:01:50.561","oldVal":"Jul 22, 2020 @ 08:01:50.559"}],[{"msg":"fn: r","newVal":"Jul 22, 2020 @ 08:01:50.562","oldVal":"Jul 22, 2020 @ 08:01:50.561"},{"msg":"fn: r","newVal":"Jul 22, 2020 @ 08:01:50.562","oldVal":"Jul 22, 2020 @ 08:01:50.561"}],[{"msg":"fn: r","newVal":"Jul 22, 2020 @ 08:01:50.564","oldVal":"Jul 22, 2020 @ 08:01:50.562"},{"msg":"fn: r","newVal":"Jul 22, 2020 @ 08:01:50.564","oldVal":"Jul 22, 2020 @ 08:01:50.562"}],[{"msg":"fn: r","newVal":"Jul 22, 2020 @ 08:01:50.567","oldVal":"Jul 22, 2020 @ 08:01:50.564"},{"msg":"fn: r","newVal":"Jul 22, 2020 @ 08:01:50.568","oldVal":"Jul 22, 2020 @ 08:01:50.564"}]]
https://errors.angularjs.org/1.7.9/$rootScope/infdig?p0=10&p1=%5B%5B%7B%22msg%22%3A%22fn%3A%20r%22%2C%22newVal%22%3A%22Jul%2022%2C%202020%20%40%2008%3A01%3A50.559%22%2C%22oldVal%22%3A%22Jul%2022%2C%202020%20%40%2008%3A01%3A50.558%22%7D%2C%7B%22msg%22%3A%22fn%3A%20r%22%2C%22newVal%22%3A%22Jul%2022%2C%202020%20%40%2008%3A01%3A50.559%22%2C%22oldVal%22%3A%22Jul%2022%2C%202020%20%40%2008%3A01%3A50.558%22%7D%5D%2C%5B%7B%22msg%22%3A%22fn%3A%20r%22%2C%22newVal%22%3A%22Jul%2022%2C%202020%20%40%2008%3A01%3A50.561%22%2C%22oldVal%22%3A%22Jul%2022%2C%202020%20%40%2008%3A01%3A50.559%22%7D%2C%7B%22msg%22%3A%22fn%3A%20r%22%2C%22newVal%22%3A%22Jul%2022%2C%202020%20%40%2008%3A01%3A50.561%22%2C%22oldVal%22%3A%22Jul%2022%2C%202020%20%40%2008%3A01%3A50.559%22%7D%5D%2C%5B%7B%22msg%22%3A%22fn%3A%20r%22%2C%22newVal%22%3A%22Jul%2022%2C%202020%20%40%2008%3A01%3A50.562%22%2C%22oldVal%22%3A%22Jul%2022%2C%202020%20%40%2008%3A01%3A50.561%22%7D%2C%7B%22msg%22%3A%22fn%3A%20r%22%2C%22newVal%22%3A%22Jul%2022%2C%202020%20%40%2008%3A01%3A50.562%22%2C%22oldVal%22%3A%22Jul%2022%2C%202020%20%40%2008%3A01%3A50.561%22%7D%5D%2C%5B%7B%22msg%22%3A%22fn%3A%20r%22%2C%22newVal%22%3A%22Jul%2022%2C%202020%20%40%2008%3A01%3A50.564%22%2C%22oldVal%22%3A%22Jul%2022%2C%202020%20%40%2008%3A01%3A50.562%22%7D%2C%7B%22msg%22%3A%22fn%3A%20r%22%2C%22newVal%22%3A%22Jul%2022%2C%202020%20%40%2008%3A01%3A50.564%22%2C%22oldVal%22%3A%22Jul%2022%2C%202020%20%40%2008%3A01%3A50.562%22%7D%5D%2C%5B%7B%22msg%22%3A%22fn%3A%20r%22%2C%22newVal%22%3A%22Jul%2022%2C%202020%20%40%2008%3A01%3A50.567%22%2C%22oldVal%22%3A%22Jul%2022%2C%202020%20%40%2008%3A01%3A50.564%22%7D%2C%7B%22msg%22%3A%22fn%3A%20r%22%2C%22newVal%22%3A%22Jul%2022%2C%202020%20%40%2008%3A01%3A50.568%22%2C%22oldVal%22%3A%22Jul%2022%2C%202020%20%40%2008%3A01%3A50.564%22%7D%5D%5D
i/<@https://esams01.domain.com:5601/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:334:837
$digest@https://esams01.domain.com:5601/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:334:100784
$apply@https://esams01.domain.com:5601/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:334:102334
callInDigest@https://esams01.domain.com:5601/bundles/commons.bundle.js:3:4316931
next@https://esams01.domain.com:5601/bundles/commons.bundle.js:3:4317176
__kbnSharedDeps__ </d</t.prototype.__tryOrUnsub@https://esams01.domain.com:5601/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:21:43355
__kbnSharedDeps__ </d</t.prototype.next@https://esams01.domain.com:5601/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:21:42500
__kbnSharedDeps__ </u</t.prototype._next@https://esams01.domain.com:5601/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:21:41576
__kbnSharedDeps__ </u</t.prototype.next@https://esams01.domain.com:5601/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:21:41247
__kbnSharedDeps__ </d</t.prototype.next@https://esams01.domain.com:5601/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:271:93911
Timefilter/<@https://esams01.domain.com:5601/s/demo-space/bundles/plugin/data/data.plugin.js:20:152566
defaultOnQuerySubmit/<@https://esams01.domain.com:5601/s/demo-space/bundles/plugin/data/data.plugin.js:6:321582
SearchBarUI/</<@https://esams01.domain.com:5601/s/demo-space/bundles/plugin/data/data.plugin.js:6:312201
bo@https://esams01.domain.com:5601/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:342:49940
vo@https://esams01.domain.com:5601/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:342:49677
vl@https://esams01.domain.com:5601/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:342:100978
__kbnSharedDeps__ </t.unstable_runWithPriority@https://esams01.domain.com:5601/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:350:3462
Hi@https://esams01.domain.com:5601/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:342:45442
yl@https://esams01.domain.com:5601/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:342:97130
ol@https://esams01.domain.com:5601/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:342:87490
Gi/<@https://esams01.domain.com:5601/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:342:45733
__kbnSharedDeps__ </t.unstable_runWithPriority@https://esams01.domain.com:5601/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:350:3462
Hi@https://esams01.domain.com:5601/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:342:45442
Gi@https://esams01.domain.com:5601/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:342:45680
Yi@https://esams01.domain.com:5601/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:342:45613
se@https://esams01.domain.com:5601/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:342:114496
An@https://esams01.domain.com:5601/bundles/kbn-ui-shared-deps/kbn-ui-shared-deps.js:342:29288

```

Idk what this error means

---

<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 19, 2020, 6:05am UTC](https://discuss.elastic.co/t/kibana-time-filter-quick-ranges-for-shifts/241994/4 "2020-08-19T06:05:47Z")

</div>

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