# Overlay timeseries for different date fields within a same index

**URL:** <https://discuss.elastic.co/t/overlay-timeseries-for-different-date-fields-within-a-same-index/217019>\
**Category:** Kibana\
**Created:** [January 29, 2020, 2:28pm UTC](https://discuss.elastic.co/t/overlay-timeseries-for-different-date-fields-within-a-same-index/217019 "2020-01-29T14:28:42Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![IvanHerreros](https://avatars.discourse-cdn.com/v4/letter/i/35a633/32.png) [@IvanHerreros](https://discuss.elastic.co/u/IvanHerreros)\
**Post date:** [January 29, 2020, 2:28pm UTC](https://discuss.elastic.co/t/overlay-timeseries-for-different-date-fields-within-a-same-index/217019/1 "2020-01-29T14:28:42Z")

</div>

Hi,  
problem: say i have an index were documents have a "createdOn" and a "publishedOn" fields.  
I want to draw two time series within a same plot, displaying the histogram counts for the two different fields. Then I can see the distribution of when were, say, blog posts created and when were they published.  
All timeseries visualizations that I have check in Kibana want you to chose one and only one date field...  
I am overlooking anything?

thanks

---

<div class="post-metadata">

**Author:** ![Bargs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bargs/32/5429_2.png) [@Bargs](https://discuss.elastic.co/u/Bargs)\
**Post date:** [January 29, 2020, 8:37pm UTC](https://discuss.elastic.co/t/overlay-timeseries-for-different-date-fields-within-a-same-index/217019/2 "2020-01-29T20:37:47Z")

</div>

Hi @IvanHerreros

You can do this easily with the new [Lens visualization builder](https://www.elastic.co/blog/introducing-kibana-lens?baymax=rtp&elektra=what-is-kibana-lens&storm=ribbon-3&rogue=everyone&iesrc=ctr), released in Kibana 7.5. If you're using an older version, you could also achieve this using [TSVB](https://www.elastic.co/guide/en/kibana/7.5/TSVB.html) or [Timelion](https://www.elastic.co/guide/en/kibana/7.5/timelion.html).

---

<div class="post-metadata">

**Author:** ![IvanHerreros](https://avatars.discourse-cdn.com/v4/letter/i/35a633/32.png) [@IvanHerreros](https://discuss.elastic.co/u/IvanHerreros)\
**Post date:** [January 30, 2020, 10:45am UTC](https://discuss.elastic.co/t/overlay-timeseries-for-different-date-fields-within-a-same-index/217019/3 "2020-01-30T10:45:02Z")

</div>

Hi @Bargs,  
I am afraid it isn't that easy ☹

To make it clearer:

Easy (can be done any of the ways you mention and a few more):

- A single visualization including:
  - line with count of blog posts **created** according to **date of creation**
  - line with count of blog posts **published** according to **date of creation**

Not easy (I am afraid it CAN'T be done any of the ways you mention):

- A single visualization including:
  - line with count blog posts **created** according to the **date of creation**
  - line with count blog posts **published** according to the **date of publication**

You can just assume that published, created (booleans) and date of creation and publication (dates) are fields that appear in all documents of a given index.

---

<div class="post-metadata">

**Author:** ![Bargs](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bargs/32/5429_2.png) [@Bargs](https://discuss.elastic.co/u/Bargs)\
**Post date:** [January 31, 2020, 9:14pm UTC](https://discuss.elastic.co/t/overlay-timeseries-for-different-date-fields-within-a-same-index/217019/4 "2020-01-31T21:14:47Z")

</div>

@IvanHerreros unless I am misunderstanding, you should be able to do what you want in TSVB. You can have multiple series in a single TSVB chart based on different index patterns, time fields, and filters. I've created a screenshot highlighting the relevant config options:

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

---

<div class="post-metadata">

**Author:** ![IvanHerreros](https://avatars.discourse-cdn.com/v4/letter/i/35a633/32.png) [@IvanHerreros](https://discuss.elastic.co/u/IvanHerreros)\
**Post date:** [February 5, 2020, 4:18pm UTC](https://discuss.elastic.co/t/overlay-timeseries-for-different-date-fields-within-a-same-index/217019/5 "2020-02-05T16:18:54Z")

</div>

Ok, thanks a lot. Yes, I did not see the override part. I just noticed the "Panel options" tab, where you seem to fix determine the same index pattern for all series.

Thank you. It is indeed practical to be able to work with more than one index in a same visualization.

---

<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:** [March 4, 2020, 4:19pm UTC](https://discuss.elastic.co/t/overlay-timeseries-for-different-date-fields-within-a-same-index/217019/6 "2020-03-04T16:19:04Z")

</div>

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