# Calculate max value of each http code

**URL:** <https://discuss.elastic.co/t/calculate-max-value-of-each-http-code/343019>\
**Category:** Kibana\
**Tags:** lens, visualisation\
**Created:** [September 14, 2023, 7:04am UTC](https://discuss.elastic.co/t/calculate-max-value-of-each-http-code/343019 "2023-09-14T07:04:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![yuswanul](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yuswanul/32/101662_2.png) [@yuswanul](https://discuss.elastic.co/u/yuswanul)\
**Post date:** [September 14, 2023, 7:04am UTC](https://discuss.elastic.co/t/calculate-max-value-of-each-http-code/343019/1 "2023-09-14T07:04:05Z")

</div>

Hello there,

I have a question about visualization here. First, this is an overview of my panel

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

as you can see there are 3 HTTP codes at 11:00 and I used breakdown by http\_status field. So, the question is how if I want to sum the max value of each HTTP code there without using breakdown? In other words, I want to make it become 1 bar without being separated by the HTTP code and the bar showing 10k counts.

Is it possible? If yes, is there any formula I can use to achieve this in the Vertical axis?

fyi, this is my case If it's applied in elastic query and I'm using kibana 7.17  
 ![image](https://us1.discourse-cdn.com/elastic/original/3X/d/1/d131918e6acfe5102e3695cd3ff36ca99dc318e5.png)

Thank you

---

<div class="post-metadata">

**Author:** ![Marco\_Liberati](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/marco_liberati/32/82953_2.png) [@Marco\_Liberati](https://discuss.elastic.co/u/Marco_Liberati)\
**Post date:** [September 18, 2023, 9:31am UTC](https://discuss.elastic.co/t/calculate-max-value-of-each-http-code/343019/2 "2023-09-18T09:31:15Z")

</div>

Hi @yuswanul

I think what you are looking for can be achieved with the "collapse by" feature added in Lens since 8.3.0: [[Lens] Add collapse fn to table and xy chart by flash1293 · Pull Request #131748 · elastic/kibana · GitHub](https://github.com/elastic/kibana/pull/131748)

In the old version 7.17 I do not think that can be achieved.

---

<div class="post-metadata">

**Author:** ![yuswanul](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/yuswanul/32/101662_2.png) [@yuswanul](https://discuss.elastic.co/u/yuswanul)\
**Post date:** [September 21, 2023, 8:23am UTC](https://discuss.elastic.co/t/calculate-max-value-of-each-http-code/343019/3 "2023-09-21T08:23:21Z")

</div>

alright. thanks for the insight. I'll try that to makesure

---

<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:** [October 19, 2023, 8:24am UTC](https://discuss.elastic.co/t/calculate-max-value-of-each-http-code/343019/4 "2023-10-19T08:24:00Z")

</div>

Closed on October 19, 2023, 8:24am UTC

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