# Lens reference line that scales with bucket/window size

**URL:** <https://discuss.elastic.co/t/lens-reference-line-that-scales-with-bucket-window-size/376092>\
**Category:** Kibana\
**Created:** [March 18, 2025, 7:32pm UTC](https://discuss.elastic.co/t/lens-reference-line-that-scales-with-bucket-window-size/376092 "2025-03-18T19:32:29Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dpotter](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dpotter/32/142128_2.png) [@dpotter](https://discuss.elastic.co/u/dpotter)\
**Post date:** [March 18, 2025, 7:32pm UTC](https://discuss.elastic.co/t/lens-reference-line-that-scales-with-bucket-window-size/376092/1 "2025-03-18T19:32:29Z")

</div>

Hi - I'd like to add a static reference line to my Kibana Lens visualization, but I'd like the line to scale based on the bucket/window size.

For example, I'd like to set the reference line to 1,000 per minute. If the window size is 1 minute, the line should display at 1,000. If the window size is 5 minutes, the line should display at 5,000.

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:** [March 19, 2025, 4:30pm UTC](https://discuss.elastic.co/t/lens-reference-line-that-scales-with-bucket-window-size/376092/2 "2025-03-19T16:30:09Z")

</div>

Hi @dpotter

you could use Lens formula for the reference line and write something like:

```auto
1000 * time_range() / 1000 / 60

```

`time_range()` is returning the current time window in `ms`, so need to convert it to minutes
