# Dropping first point sum aggregation visual builder

**URL:** https://discuss.elastic.co/t/dropping-first-point-sum-aggregation-visual-builder/167195
**Category:** Kibana
**Created:** [February 5, 2019, 9:35pm UTC](https://discuss.elastic.co/t/dropping-first-point-sum-aggregation-visual-builder/167195 "2019-02-05T21:35:00Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![tehmoon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tehmoon/32/24892_2.png) [@tehmoon](https://discuss.elastic.co/u/tehmoon)
#### Post date: [February 5, 2019, 9:35pm UTC](https://discuss.elastic.co/t/dropping-first-point-sum-aggregation-visual-builder/167195/1 "2019-02-05T21:35:00Z")

</div>

Hi there!

I was wondering if there was a way to dropping the first point in the visual builder as it messes up with the whole graph.

Let me explain:  
I'm trying to calculate the rate of queries per second based on the `pg_stat_statements` from `metricbeat`'s module's `postgresql`.

There is an exported variable that is called `statement.query.calls` which is the number of times the query has been called. This number is monotonic until there is a flush with the stats (or a restart but I'm not sure).

So in order to calculate the rate of the qp/s of _all_ the queries, I do a sum. Since it's a time series, I plot it on a `date histogram`.

The issue is that if I don't specify the unit -- which is every 10 sec -- the first bucket will be false because the time range will not be precise.

 ![40%20PM](https://us1.discourse-cdn.com/elastic/original/3X/d/1/d14c52cab33d78c521570448844f8040d3057d96.png) ![49%20PM](https://us1.discourse-cdn.com/elastic/original/3X/2/3/234208b91d0e30ea2e6ec5899b525b3f5aab622c.png)  
As you can see, the first one is incorrect, but the second one is.

Here's another example:

 ![13%20PM](https://us1.discourse-cdn.com/elastic/original/3X/b/c/bc82969e4e979d8b5ab7abd331cb7384274ee69e.png) ![51%20PM](https://us1.discourse-cdn.com/elastic/original/3X/2/a/2a4d0fe36614a24e2a5a508cb83fdedc0128167a.png)  
In the two examples, you see that the first bucket is not like the other ones. It's a simple `bucket sum` and `sum` aggregation to show that the behavior is from `elasticsearch` and I think it right.  
I'm looking for a way to drop the first one so the `derivative` will make more sense.

Last thing: yes I could set the interval to `10s` but if I want to zoom out to the last hour, the graph has too many variations on it.

Thank you for your help!

Amazing product!!!

---

<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: [February 5, 2019, 10:57pm UTC](https://discuss.elastic.co/t/dropping-first-point-sum-aggregation-visual-builder/167195/2 "2019-02-05T22:57:25Z")

</div>

This is not currently possible. You can open an enhancement issue at [https://github.com/elastic/kibana/issues/new?template=Feature\_request.md](https://github.com/elastic/kibana/issues/new?template=Feature_request.md)

---

<div class="post-metadata">

### Author: ![tehmoon](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tehmoon/32/24892_2.png) [@tehmoon](https://discuss.elastic.co/u/tehmoon)
#### Post date: [February 6, 2019, 12:39am UTC](https://discuss.elastic.co/t/dropping-first-point-sum-aggregation-visual-builder/167195/3 "2019-02-06T00:39:49Z")

</div>

Thank you so much for the answer @Nathan_Reese!  
I will open the feature request. ([https://github.com/elastic/kibana/issues/30170](https://github.com/elastic/kibana/issues/30170))

I am considering having another process that would export the query count in the meantime.

---

<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: [March 6, 2019, 12:39am UTC](https://discuss.elastic.co/t/dropping-first-point-sum-aggregation-visual-builder/167195/4 "2019-03-06T00:39:58Z")

</div>

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