# Is it possible to visualize different time series based on 2 fields on kibana

**URL:** <https://discuss.elastic.co/t/is-it-possible-to-visualize-different-time-series-based-on-2-fields-on-kibana/330035>\
**Category:** Kibana\
**Tags:** kql-kibana-query-language, dashboard\
**Created:** [April 14, 2023, 5:43pm UTC](https://discuss.elastic.co/t/is-it-possible-to-visualize-different-time-series-based-on-2-fields-on-kibana/330035 "2023-04-14T17:43:48Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![FTOR](https://avatars.discourse-cdn.com/v4/letter/f/977dab/32.png) [@FTOR](https://discuss.elastic.co/u/FTOR)\
**Post date:** [April 14, 2023, 5:43pm UTC](https://discuss.elastic.co/t/is-it-possible-to-visualize-different-time-series-based-on-2-fields-on-kibana/330035/1 "2023-04-14T17:43:48Z")

</div>

Hello, I would like to visualise different time series based on 2 fields (field1 and field2).  
I have a field named numr\_Ficher that could have the values : 2235/2234/2230..  
And another field named operateur that could have the values : A/B/C  
so I would to have different time series on the same graph for  
A and 2235  
A and 2234  
A and 2230  
B and 2235  
...  
I tried the metric TSVB, but I could group by only with one field

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

I tried the lenz panel, and I added filters, but we need to add filters manually

 ![lenz_filters](https://us1.discourse-cdn.com/elastic/original/3X/e/c/ecce28fcc80b9cf71a726385a1b881af5fae81ad.png)

---

<div class="post-metadata">

**Author:** ![Marius\_Dragomir](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marius_dragomir/32/42087_2.png) [@Marius\_Dragomir](https://discuss.elastic.co/u/Marius_Dragomir)\
**Post date:** [April 15, 2023, 1:02am UTC](https://discuss.elastic.co/t/is-it-possible-to-visualize-different-time-series-based-on-2-fields-on-kibana/330035/2 "2023-04-15T01:02:29Z")

</div>

The way you have done in Lens is the right way to do it. You will have to add them manually, indeed.  
In TSVB you could add multiple series to the same chart but this will only work if you have a known finite number of "A, B, C, ..." or "2235, 2234, ... " values in their corresponding field. So they would have to added manually to the chart.

---

<div class="post-metadata">

**Author:** ![FTOR](https://avatars.discourse-cdn.com/v4/letter/f/977dab/32.png) [@FTOR](https://discuss.elastic.co/u/FTOR)\
**Post date:** [April 17, 2023, 10:37am UTC](https://discuss.elastic.co/t/is-it-possible-to-visualize-different-time-series-based-on-2-fields-on-kibana/330035/3 "2023-04-17T10:37:56Z")

</div>

Thank you for your response ! I would like to apply the filters on all panels of the same dashboard. I tried to apply a filter as follow, but I could only have one time serie. Is it possible to apply a filter with a group by category and operateur and have different time series on the same panel ?  
{  
"query": {  
"bool": {  
"must": [  
{  
"match": {  
"numr\_Ficher ": 2235  
}  
},  
{  
"match": {  
"operateur": "A"  
}  
}  
]  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![FTOR](https://avatars.discourse-cdn.com/v4/letter/f/977dab/32.png) [@FTOR](https://discuss.elastic.co/u/FTOR)\
**Post date:** [April 17, 2023, 12:43pm UTC](https://discuss.elastic.co/t/is-it-possible-to-visualize-different-time-series-based-on-2-fields-on-kibana/330035/4 "2023-04-17T12:43:23Z")

</div>

i tried another query , but it didn't work also. I put this json script on Add Filter/Edit as query DSL  
{  
"query": {  
"bool": {  
"should": [  
{  
"bool": {  
"must": [  
{  
"match": {  
"numr\_fich": 2235  
}  
},  
{  
"match": {  
"operateur": "A"  
}  
}  
]  
}  
},  
{  
"bool": {  
"must": [  
{  
"match": {  
"numr\_fich": 2235  
}  
},  
{  
"match": {  
"operateur": "B"  
}  
}  
]  
}  
}  
],  
"minimum\_should\_match": 1  
}  
}  
}

---

<div class="post-metadata">

**Author:** ![FTOR](https://avatars.discourse-cdn.com/v4/letter/f/977dab/32.png) [@FTOR](https://discuss.elastic.co/u/FTOR)\
**Post date:** [April 18, 2023, 11:41am UTC](https://discuss.elastic.co/t/is-it-possible-to-visualize-different-time-series-based-on-2-fields-on-kibana/330035/5 "2023-04-18T11:41:37Z")

</div>

I found a solution for this topic. I applyed a filter on each panel with activating Group By this field first. And, I added a filter on the top of Dashboard also

---

<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:** [May 16, 2023, 11:42am UTC](https://discuss.elastic.co/t/is-it-possible-to-visualize-different-time-series-based-on-2-fields-on-kibana/330035/6 "2023-05-16T11:42:31Z")

</div>

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