# Week over Week Percentage Change for Metric Field

**URL:** https://discuss.elastic.co/t/week-over-week-percentage-change-for-metric-field/266810
**Category:** Kibana
**Created:** [March 10, 2021, 1:17pm UTC](https://discuss.elastic.co/t/week-over-week-percentage-change-for-metric-field/266810 "2021-03-10T13:17:46Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![Rakesh\_Rayabarapu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rakesh_rayabarapu/32/79132_2.png) [@Rakesh\_Rayabarapu](https://discuss.elastic.co/u/Rakesh_Rayabarapu)
#### Post date: [March 10, 2021, 1:17pm UTC](https://discuss.elastic.co/t/week-over-week-percentage-change-for-metric-field/266810/1 "2021-03-10T13:17:46Z")

</div>

Hello Team,

Please help me to get Table visualization with Category Field, Current Week Metric, Previous Week, % change as columns.

---

<div class="post-metadata">

### Author: ![jbudz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jbudz/32/45922_2.png) [@jbudz](https://discuss.elastic.co/u/jbudz)
#### Post date: [March 10, 2021, 8:54pm UTC](https://discuss.elastic.co/t/week-over-week-percentage-change-for-metric-field/266810/2 "2021-03-10T20:54:33Z")

</div>

Can you share a little more about the document structure? Are current week and previous week metrics in the same document? If so, a scripted field could be made to calculate the percent change and all three columns could be added as metrics.

If not, it's less straight forward. A derivative pipeline aggregation on metric can be used to calculate the change but there isn't a way to convert that to percent.

---

<div class="post-metadata">

### Author: ![Rakesh\_Rayabarapu](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rakesh_rayabarapu/32/79132_2.png) [@Rakesh\_Rayabarapu](https://discuss.elastic.co/u/Rakesh_Rayabarapu)
#### Post date: [March 11, 2021, 5:06am UTC](https://discuss.elastic.co/t/week-over-week-percentage-change-for-metric-field/266810/3 "2021-03-11T05:06:42Z")

</div>

Thanks Jon for response,

we have three fields

1. Category (string)
2. timestamp (datetime)
3. responsetime (int)

from above we need to get percentage week over week as table.

I tried TSVB but, its working in metric visualization not in table format.

Thanks in advance.

---

<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: [April 8, 2021, 5:07am UTC](https://discuss.elastic.co/t/week-over-week-percentage-change-for-metric-field/266810/4 "2021-04-08T05:07:21Z")

</div>

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