# Cumulative Sum Aggregation and Display Issue in Kibana 7.8

**URL:** https://discuss.elastic.co/t/cumulative-sum-aggregation-and-display-issue-in-kibana-7-8/240616
**Category:** Kibana
**Created:** [July 10, 2020, 12:29am UTC](https://discuss.elastic.co/t/cumulative-sum-aggregation-and-display-issue-in-kibana-7-8/240616 "2020-07-10T00:29:13Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![tenet\_testuser1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tenet_testuser1/32/67526_2.png) [@tenet\_testuser1](https://discuss.elastic.co/u/tenet_testuser1)
#### Post date: [July 10, 2020, 12:29am UTC](https://discuss.elastic.co/t/cumulative-sum-aggregation-and-display-issue-in-kibana-7-8/240616/1 "2020-07-10T00:29:13Z")

</div>

Hello,

I have a line graph chart comparing showing % change of a certain metric for each of the many sectors.

My Report:

Bucket : split series  
Term: sector\_name.keyword  
Order by "Custom Metric"  
Aggregation: Max (field: changepercent)  
order: ascending 15

X - axis date is date timestamp  
, y axis is cumultivee sum percent

However, what I notice is, that it does not show the tru top 15 sectors based on % change. It shows some random 15. In other words, let's say I asked for top 3  
and my SQL (from the db) shows output as  
sectorA 53%  
sectorB 47%  
sectorC 41%  
sectorD 38%  
sectorE 25%,

It shows top 3 as sectorA, sector C and sector E or some random ones like that.  
It is never the tru top 10 or 15 based on % change. It's always some random 15.

I tried doing min chaangepercent, and also, descending instead of ascending,,, no matter what I do, it always skips some .

Please help.

---

<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: [July 11, 2020, 1:45pm UTC](https://discuss.elastic.co/t/cumulative-sum-aggregation-and-display-issue-in-kibana-7-8/240616/2 "2020-07-11T13:45:30Z")

</div>

This sounds like it may be a bug. Would you mind opening an issue at [https://github.com/elastic/kibana/issues/new?template=Bug\_report.md](https://github.com/elastic/kibana/issues/new?template=Bug_report.md)

---

<div class="post-metadata">

### Author: ![tenet\_testuser1](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tenet_testuser1/32/67526_2.png) [@tenet\_testuser1](https://discuss.elastic.co/u/tenet_testuser1)
#### Post date: [July 11, 2020, 2:40pm UTC](https://discuss.elastic.co/t/cumulative-sum-aggregation-and-display-issue-in-kibana-7-8/240616/3 "2020-07-11T14:40:46Z")

</div>

Solved.

In the aggregation under terms, instead of using min and max, I tried sum. Then did ascending and descending.

This provided the correct result.

I'm realizing that I was visualizing the mathematical projections incorrectly.

Thanks for your reply.

---

<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: [August 8, 2020, 2:40pm UTC](https://discuss.elastic.co/t/cumulative-sum-aggregation-and-display-issue-in-kibana-7-8/240616/4 "2020-08-08T14:40:55Z")

</div>

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