# Display Overall Max and Average of Sum in TSVB in Metric and Markdown Visualizations (v8.6.1)

**URL:** <https://discuss.elastic.co/t/display-overall-max-and-average-of-sum-in-tsvb-in-metric-and-markdown-visualizations-v8-6-1/345411>\
**Category:** Kibana\
**Created:** [October 19, 2023, 6:01pm UTC](https://discuss.elastic.co/t/display-overall-max-and-average-of-sum-in-tsvb-in-metric-and-markdown-visualizations-v8-6-1/345411 "2023-10-19T18:01:34Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Behnam.R](https://avatars.discourse-cdn.com/v4/letter/b/48db29/32.png) [@Behnam.R](https://discuss.elastic.co/u/Behnam.R)\
**Post date:** [October 19, 2023, 6:01pm UTC](https://discuss.elastic.co/t/display-overall-max-and-average-of-sum-in-tsvb-in-metric-and-markdown-visualizations-v8-6-1/345411/1 "2023-10-19T18:01:34Z")

</div>

Hi all,

I'm using Elastic version 8.6.1. In Kibana's TSVB, I've set up a Time Series visualization where I've first aggregated using the `Sum` of a specific field. I then applied a secondary pipeline aggregation to compute the `Overall Max` and `Overall Average` of the sum.

In the Time Series visualization, I can clearly see a straight line representing the overall max/average across the entire time range, which is expected. However, when I transition to the Metric or Markdown visualizations in TSVB to display these values in one single metric, it seems to only show the total sum rather than the computed overall max or average of that sum.

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/1/4/14f8a526e446deff9bf3d7bfda07770e42ed336f.png)

Is this a known limitation or am I perhaps missing something in the configuration?

---

<div class="post-metadata">

**Author:** ![jsanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsanz/32/53734_2.png) [@jsanz](https://discuss.elastic.co/u/jsanz)\
**Post date:** [October 26, 2023, 4:11pm UTC](https://discuss.elastic.co/t/display-overall-max-and-average-of-sum-in-tsvb-in-metric-and-markdown-visualizations-v8-6-1/345411/2 "2023-10-26T16:11:49Z")

</div>

I've created a TSVB using the eCommerce dataset and a similar setup but using the average of the `base_price` field.

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

When changing to the `Metric` visualization option, it indeed leaves just the first two options yielding the same value and on `markdwon`, it leaves all the options with the same value.

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

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/9/1/91baad7f87c7d7af188be7ba755843ccc2bedad8.png)

The exact value is shown because Kibana is taking the whole period to get the average. With that, the bucket aggregation will always return the same value because there is only one data point.

I would suggest using Lens to show the Metrics so you can get a dashboard like this:

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

As you can see the values in the metrics coincide with the legend of the TSVB. The trick to do this with lens is to do break down the metric using your time field and then use the **Collapse** option to convert the collection of charts into a single value.

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

Remember to set up the same interval in the TSVB and the metrics to ensure the metric is computed equally.

Hope it helps.

---

<div class="post-metadata">

**Author:** ![Behnam.R](https://avatars.discourse-cdn.com/v4/letter/b/48db29/32.png) [@Behnam.R](https://discuss.elastic.co/u/Behnam.R)\
**Post date:** [October 27, 2023, 8:55am UTC](https://discuss.elastic.co/t/display-overall-max-and-average-of-sum-in-tsvb-in-metric-and-markdown-visualizations-v8-6-1/345411/3 "2023-10-27T08:55:34Z")

</div>

Thanks a lot for the detailed answer @jsanz. Now I am aware of the logic much better, I will then convert the TSVB line chart to lens to ensure that the metrics are computed equally (as based on my understanding TSVB and lens have different dynamic intervals) and will use the lens metrics for showing the average and max. thanks again for the help!

---

<div class="post-metadata">

**Author:** ![jsanz](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/jsanz/32/53734_2.png) [@jsanz](https://discuss.elastic.co/u/jsanz)\
**Post date:** [October 27, 2023, 8:57am UTC](https://discuss.elastic.co/t/display-overall-max-and-average-of-sum-in-tsvb-in-metric-and-markdown-visualizations-v8-6-1/345411/4 "2023-10-27T08:57:05Z")

</div>

You are absolutely right on moving everything to Lens 👍

---

<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:** [November 24, 2023, 8:57am UTC](https://discuss.elastic.co/t/display-overall-max-and-average-of-sum-in-tsvb-in-metric-and-markdown-visualizations-v8-6-1/345411/5 "2023-11-24T08:57:44Z")

</div>

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