# How to use offset in table metrics

**URL:** <https://discuss.elastic.co/t/how-to-use-offset-in-table-metrics/290432>\
**Category:** Elasticsearch\
**Created:** [November 29, 2021, 11:54am UTC](https://discuss.elastic.co/t/how-to-use-offset-in-table-metrics/290432 "2021-11-29T11:54:55Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Liangliang\_Qiu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/liangliang_qiu/32/78183_2.png) [@Liangliang\_Qiu](https://discuss.elastic.co/u/Liangliang_Qiu)\
**Post date:** [November 29, 2021, 11:54am UTC](https://discuss.elastic.co/t/how-to-use-offset-in-table-metrics/290432/1 "2021-11-29T11:54:56Z")

</div>

i want to get the count of current hour, the hour of yesterday and the hour of 7 days ago.  
Here is the table i need.

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

how to set offset in input json?

---

<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 27, 2021, 11:55am UTC](https://discuss.elastic.co/t/how-to-use-offset-in-table-metrics/290432/2 "2021-12-27T11:55:33Z")

</div>

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