# Show the diff between 2 lines in Kibana

**URL:** https://discuss.elastic.co/t/show-the-diff-between-2-lines-in-kibana/243802
**Category:** Kibana
**Created:** [August 5, 2020, 2:52am UTC](https://discuss.elastic.co/t/show-the-diff-between-2-lines-in-kibana/243802 "2020-08-05T02:52:11Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![jdevilla20](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jdevilla20/32/75281_2.png) [@jdevilla20](https://discuss.elastic.co/u/jdevilla20)
#### Post date: [August 5, 2020, 2:52am UTC](https://discuss.elastic.co/t/show-the-diff-between-2-lines-in-kibana/243802/1 "2020-08-05T02:52:12Z")

</div>

I am using the rollup feature to rollup 2 indexes. They are defined as the following:

```auto
PUT /frontend
{
  "settings": {
    "number_of_shards": 5
  },
  "mappings": {
    "properties": {
          "owner": { "type": "keyword"},
          "schema": { "type": "keyword"},
          "startTime":{ "type": "date"},
          "numRecords": { "type": "integer" },
          "recordBytes":{ "type": "long" }
    }
  }
}

PUT /backend
{
  "settings": {
    "number_of_shards": 5
  },
  "mappings": {
    "properties": {
          "owner": { "type": "keyword"},
          "schema": { "type": "keyword"},
          "startTime":{ "type": "date"},
          "recordsPersisted":{ "type": "integer"}
    }
  }
}

```

I have created 2 rollup jobs (frontend-rollup, backend-rollup), both pointing to an index called rollup. When I graph the data, I can show both the lines numRecords and recordsPersisted. I would like to graph the difference between the two lines. Since numRecords and recordsPersisted are part of different documents, but the same aggregate grouping, is this possible?

---

<div class="post-metadata">

### Author: ![bhavyarm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bhavyarm/32/22392_2.png) [@bhavyarm](https://discuss.elastic.co/u/bhavyarm)
#### Post date: [August 5, 2020, 9:50pm UTC](https://discuss.elastic.co/t/show-the-diff-between-2-lines-in-kibana/243802/2 "2020-08-05T21:50:50Z")

</div>

We have multiple options for you -

Time series visual builder should help here as you can use multiple indices: [https://www.elastic.co/guide/en/kibana/current/TSVB.html](https://www.elastic.co/guide/en/kibana/current/TSVB.html)  
or Vega - [https://www.elastic.co/guide/en/kibana/current/vega-graph.html](https://www.elastic.co/guide/en/kibana/current/vega-graph.html)  
or lens - [https://www.elastic.co/what-is/kibana-lens](https://www.elastic.co/what-is/kibana-lens)

Thanks,  
Bhavya

---

<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: [September 2, 2020, 9:50pm UTC](https://discuss.elastic.co/t/show-the-diff-between-2-lines-in-kibana/243802/3 "2020-09-02T21:50:51Z")

</div>

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