# Variance/Deviation Visualization

**URL:** <https://discuss.elastic.co/t/variance-deviation-visualization/257690>\
**Category:** Kibana\
**Created:** [December 4, 2020, 6:39pm UTC](https://discuss.elastic.co/t/variance-deviation-visualization/257690 "2020-12-04T18:39:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![stevezemlicka](https://avatars.discourse-cdn.com/v4/letter/s/41988e/32.png) [@stevezemlicka](https://discuss.elastic.co/u/stevezemlicka)\
**Post date:** [December 4, 2020, 6:39pm UTC](https://discuss.elastic.co/t/variance-deviation-visualization/257690/1 "2020-12-04T18:39:51Z")

</div>

I have a dataset with readings every 30m. I want to set a start time and an end time at a single interval (eg 1:00 - 1:30) and rank the devices based on the amount they changed. I've been using the Top N feature in TSVB. I've started off by creating a TSVB with a Max aggregation followed by a Derivative of the Max and lastly a Positive Only of the Derivative and grouped by my device.

I think the problem is the ordering because I get many 0 results and the only way to get more positive results is to increase the Top # which also increases the number of 0 results. I'm guessing it has to do with only being able to order by the Max aggregation not the Derivative of Max. Perhaps related to:

> [@Order by Math Aggregation in TSVB Top N Visualisation](https://discuss.elastic.co/t/order-by-math-aggregation-in-tsvb-top-n-visualisation/209646):
>
> Hi, I'm trying to use the Top N visualisation to obtain a list of hosts sorted by CPU usage descending. To do this, I am dividing CPU usage by the number of cores on the system using a pipeline math aggregation. However, I am then unable to sort by this aggregation: Should I be going about this another way? I have a separate need to sort by a derivative aggregation, and that is not possible either. Any help would be much appreciated. Thanks.

Is there any way around this ordering issue?

---

<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:** [January 1, 2021, 6:39pm UTC](https://discuss.elastic.co/t/variance-deviation-visualization/257690/2 "2021-01-01T18:39:58Z")

</div>

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