# How to visualize %failed and order by this value descending?

**URL:** <https://discuss.elastic.co/t/how-to-visualize-failed-and-order-by-this-value-descending/207360>\
**Category:** Kibana\
**Created:** [November 11, 2019, 1:50pm UTC](https://discuss.elastic.co/t/how-to-visualize-failed-and-order-by-this-value-descending/207360 "2019-11-11T13:50:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![asp](https://avatars.discourse-cdn.com/v4/letter/a/9fc348/32.png) [@asp](https://discuss.elastic.co/u/asp)\
**Post date:** [November 11, 2019, 1:50pm UTC](https://discuss.elastic.co/t/how-to-visualize-failed-and-order-by-this-value-descending/207360/1 "2019-11-11T13:50:52Z")

</div>

Hi,

I have status events of function calls in elastic. Status can be ok, error, etc. There are more than 100 different functions which can be called.

I want to visualize following use case:

- function which has highest **percentage** of non-ok messages  
`percentage = (all status except ok) / (ok + all status except ok)`  
I want to see broken functions, even if they are barely used (by count).

I found a solution with external plugin enhanced table ([https://github.com/fbaligand/kibana-enhanced-table](https://github.com/fbaligand/kibana-enhanced-table)) to get the data I need, but to visualize in a chart would be really nice.  
.

---

<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:** [November 18, 2019, 7:42pm UTC](https://discuss.elastic.co/t/how-to-visualize-failed-and-order-by-this-value-descending/207360/2 "2019-11-18T19:42:35Z")

</div>

You can try this in TSVB, by using the Math aggregation to calculate that percentage.

---

<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:** [December 16, 2019, 7:43pm UTC](https://discuss.elastic.co/t/how-to-visualize-failed-and-order-by-this-value-descending/207360/3 "2019-12-16T19:43:02Z")

</div>

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