# Data Table - show number of events for each device, each day for last 7 days

**URL:** <https://discuss.elastic.co/t/data-table-show-number-of-events-for-each-device-each-day-for-last-7-days/190068>\
**Category:** Kibana\
**Created:** [July 11, 2019, 4:22pm UTC](https://discuss.elastic.co/t/data-table-show-number-of-events-for-each-device-each-day-for-last-7-days/190068 "2019-07-11T16:22:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MichaelC](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@MichaelC](https://discuss.elastic.co/u/MichaelC)\
**Post date:** [July 11, 2019, 4:22pm UTC](https://discuss.elastic.co/t/data-table-show-number-of-events-for-each-device-each-day-for-last-7-days/190068/1 "2019-07-11T16:22:50Z")

</div>

I've been trying to recreate a report that shows the number of events occurring on specific devices, each day over seven days. The purpose of the report is to monitor the event number and make note of event counts that are much higher or lower than normal.

Creating a typical data table visualization has proved difficult due to having two separate fields to sort by, both sensor.name and timestamp. I want the report to look like this:

 ![SensorReport](https://us1.discourse-cdn.com/elastic/original/3X/5/c/5cb328dd1bcc3910bff762006c8e0de956a57fa4.jpeg)

The best I've been able to do in Kibana looks like this, with separate columns for each day and the sensor name appearing each time, which is clunky.

 ![2019-07-11%2009_15_25-Kibana](https://us1.discourse-cdn.com/elastic/original/3X/e/7/e7dea2fae8b07d2fb3fde5a6de06e69f4e387844.jpeg)

I pivoted to the time series visual builder, which looked promising, but there are no controls for data offset when selecting data table. I thought creating 7 separate columns with a filter applied to each one with @timestamp:[now-2d TO now-1d], @timestamp:[now-3d TO now-2d], etc. would work. However the filter doesn't support that type of query.

Any suggestions? Thanks

---

<div class="post-metadata">

**Author:** ![thomasneirynck](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomasneirynck/32/23313_2.png) [@thomasneirynck](https://discuss.elastic.co/u/thomasneirynck)\
**Post date:** [July 12, 2019, 8:48pm UTC](https://discuss.elastic.co/t/data-table-show-number-of-events-for-each-device-each-day-for-last-7-days/190068/2 "2019-07-12T20:48:37Z")

</div>

@MichaelC

So these spreadsheet like tables are difficult to do in Kibana (for the reasons you describe).

I think one alternative to consider is a heatmap visualization and turn on labeling.

For the Y-axis, choose your term-agg on your sensor-field. And for the X-axis, choose a Date-histogram with day-intervals. For the metric, do a count.

See [https://www.elastic.co/blog/awesome-new-kibana-visualizations-heatmap-and-point-series](https://www.elastic.co/blog/awesome-new-kibana-visualizations-heatmap-and-point-series)

The actual values will be in the tooltip when hovering over a cell.

---

<div class="post-metadata">

**Author:** ![MichaelC](https://avatars.discourse-cdn.com/v4/letter/m/82dd89/32.png) [@MichaelC](https://discuss.elastic.co/u/MichaelC)\
**Post date:** [July 13, 2019, 12:35am UTC](https://discuss.elastic.co/t/data-table-show-number-of-events-for-each-device-each-day-for-last-7-days/190068/3 "2019-07-13T00:35:37Z")

</div>

Thank you Thomas, I'll be able to make the heatmap visualization work. I'll have to split the sensors into two visualizations, one with ascending count and the other descending, due to the series limit. However this works for me and from the sound of things this area might be improved upon in the future.

---

<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 10, 2019, 12:35am UTC](https://discuss.elastic.co/t/data-table-show-number-of-events-for-each-device-each-day-for-last-7-days/190068/4 "2019-08-10T00:35:45Z")

</div>

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