# Kibana data tables

**URL:** https://discuss.elastic.co/t/kibana-data-tables/181658
**Category:** Kibana
**Created:** [May 17, 2019, 8:59pm UTC](https://discuss.elastic.co/t/kibana-data-tables/181658 "2019-05-17T20:59:29Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Ambarish\_Chitnis](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/ambarish_chitnis/32/45312_2.png) [@Ambarish\_Chitnis](https://discuss.elastic.co/u/Ambarish_Chitnis)
#### Post date: [May 17, 2019, 8:59pm UTC](https://discuss.elastic.co/t/kibana-data-tables/181658/1 "2019-05-17T20:59:29Z")

</div>

I am new to Kibana and am stuck with aggregating data in data tables.

## Data

I have imported sales data per region into elastic search for 2 weeks (one document per day) and here is a sample JSON.

{"type":"online","date":"05/01/2019","state":"WA", "orders":"1000","age\_range":"18-24","device":"IOS"}  
{"type":"online","date":"05/02/2019","state":"WA", "orders":"1000","age\_range":"18-24","device":"IOS"}

I am trying to build this data table view:

STATE This-week Last-week Change  
WA 1000 1100 10%  
CA 1000 1300 30%

I am not sure how to aggregate current week and previous week data and compute the percentage change.

---

<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: [June 14, 2019, 8:59pm UTC](https://discuss.elastic.co/t/kibana-data-tables/181658/2 "2019-06-14T20:59:42Z")

</div>

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