# Kibana Visualisation Doubts-Conditional

**URL:** <https://discuss.elastic.co/t/kibana-visualisation-doubts-conditional/254438>\
**Category:** Kibana\
**Created:** [November 5, 2020, 4:40pm UTC](https://discuss.elastic.co/t/kibana-visualisation-doubts-conditional/254438 "2020-11-05T16:40:59Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Shubhamrai7](https://avatars.discourse-cdn.com/v4/letter/s/ecc23a/32.png) [@Shubhamrai7](https://discuss.elastic.co/u/Shubhamrai7)\
**Post date:** [November 5, 2020, 4:40pm UTC](https://discuss.elastic.co/t/kibana-visualisation-doubts-conditional/254438/1 "2020-11-05T16:40:59Z")

</div>

Need to Find Availability of APIs-  
I am new to Kibana . I am stuck with one visualisation. What I have to do is ,first find the failure rate of APIs( Count Http code[500 to 599] divided by /All the count of APIs) for particular TimeSlot (lets say 2 hours divided in slots per 30 minutes-so we have 4 time periods).  
then if the above failure rate is greater or equal to 8% for any slot of 30 minutes, we need to mark that period as unavailable.it means availability (3/4=75%)( count of time slots failure rate less than 8% / Count of Total time slots )  
Suppose out of 4 above slots ,in one slot failure rate more than 8%.Then the final result is **availability -75% and unavailability-25%**

---

<div class="post-metadata">

**Author:** ![Nathan\_Reese](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/nathan_reese/32/84829_2.png) [@Nathan\_Reese](https://discuss.elastic.co/u/Nathan_Reese)\
**Post date:** [November 6, 2020, 2:29pm UTC](https://discuss.elastic.co/t/kibana-visualisation-doubts-conditional/254438/2 "2020-11-06T14:29:06Z")

</div>

Use [TSVB](https://www.elastic.co/guide/en/kibana/7.10/dashboard.html#tsvb) to visualize time series and calculate values per time bucket.

Here is a good blog post to get you started [https://www.elastic.co/blog/how-to-display-data-as-a-percentage-in-kibana-visualizations](https://www.elastic.co/blog/how-to-display-data-as-a-percentage-in-kibana-visualizations)

---

<div class="post-metadata">

**Author:** ![Shubhamrai7](https://avatars.discourse-cdn.com/v4/letter/s/ecc23a/32.png) [@Shubhamrai7](https://discuss.elastic.co/u/Shubhamrai7)\
**Post date:** [November 9, 2020, 5:30am UTC](https://discuss.elastic.co/t/kibana-visualisation-doubts-conditional/254438/3 "2020-11-09T05:30:32Z")

</div>

Thanks for your suggestion.but problem here is second step where I need to find the count of time slots,not able to do so..is there a way to do that

---

<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 7, 2020, 5:30am UTC](https://discuss.elastic.co/t/kibana-visualisation-doubts-conditional/254438/4 "2020-12-07T05:30:38Z")

</div>

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