# Kibana Bar Graph Shows Incorrect Sums

**URL:** <https://discuss.elastic.co/t/kibana-bar-graph-shows-incorrect-sums/94158>\
**Category:** Kibana\
**Created:** [July 21, 2017, 7:56pm UTC](https://discuss.elastic.co/t/kibana-bar-graph-shows-incorrect-sums/94158 "2017-07-21T19:56:50Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![maione](https://avatars.discourse-cdn.com/v4/letter/m/7feea3/32.png) [@maione](https://discuss.elastic.co/u/maione)\
**Post date:** [July 21, 2017, 7:56pm UTC](https://discuss.elastic.co/t/kibana-bar-graph-shows-incorrect-sums/94158/1 "2017-07-21T19:56:50Z")

</div>

I have made a vertical bar graph in Kibana and all seemed to be good at first. However, when I was checking the values against the buckets I found some issues. The Sum being displayed is incorrect for 8/10 buckets. So for example, bucket 8 shows a sum of $1200 on the bar graph, but the actual value is around $700. When bucket 8 is clicked to filter the dashboard it displays the correct amount.

I checked the dev console to try to find the issue and discovered that only 19/28 documents are being read in. I believe that it is skipping over data stored in certain shards.

Can I fix this in the visualization/settings or do I need to manually assign fields to certain shards? If the latter is my only option, what is the safest way to go about doing so?

![](https://us1.discourse-cdn.com/elastic/original/3X/b/4/b4fcce06b712df0ebdda13803b76fca5c572cde8.png)

---

<div class="post-metadata">

**Author:** ![tylersmalley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylersmalley/32/8833_2.png) [@tylersmalley](https://discuss.elastic.co/u/tylersmalley)\
**Post date:** [July 21, 2017, 8:01pm UTC](https://discuss.elastic.co/t/kibana-bar-graph-shows-incorrect-sums/94158/2 "2017-07-21T20:01:04Z")

</div>

On the visualization, can you click the carrot on the bottom to expand the panel and paste the response?

---

<div class="post-metadata">

**Author:** ![maione](https://avatars.discourse-cdn.com/v4/letter/m/7feea3/32.png) [@maione](https://discuss.elastic.co/u/maione)\
**Post date:** [July 21, 2017, 8:15pm UTC](https://discuss.elastic.co/t/kibana-bar-graph-shows-incorrect-sums/94158/3 "2017-07-21T20:15:58Z")

</div>

```auto
{
  "took": 0,
  "timed_out": false,
  "_shards": {
    "total": 5,
    "successful": 5,
    "failed": 0
  },
  "hits": {
    "total": 6532,
    "max_score": 0,
    "hits": []
  },
  "aggregations": {
    "2": {
      "doc_count_error_upper_bound": -1,
      "sum_other_doc_count": 6200,
      "buckets": [
        {
          "1": {
            "value": 14009.570190429688
          },
          "key": “001”,
          "doc_count": 30,
          "2-orderAgg": {
            "value": 14009.570190429688
          }
        },
        {
          "1": {
            "value": 3410.659927368164
          },
          "key": “002”,
          "doc_count": 4,
          "2-orderAgg": {
            "value": 3410.659927368164
          }
        },
        {
          "1": {
            "value": 3165.9600270986557
          },
          "key": “003”,
          "doc_count": 25,
          "2-orderAgg": {
            "value": 3165.9600270986557
          }
        },
        {
          "1": {
            "value": 1907.719970703125
          },
          "key": “004”,
          "doc_count": 2,
          "2-orderAgg": {
            "value": 1907.719970703125
          }
        },
        {
          "1": {
            "value": 1865.2699982598424
          },
          "key": “005”,
          "doc_count": 173,
          "2-orderAgg": {
            "value": 1865.2699982598424
          }
        },
        {
          "1": {
            "value": 1353.4599609375
          },
          "key": “006”,
          "doc_count": 2,
          "2-orderAgg": {
            "value": 1353.4599609375
          }
        },
        {
          "1": {
            "value": 1227.3400103598833
          },
          "key": “007”,
          "doc_count": 58,
          "2-orderAgg": {
            "value": 1227.3400103598833
          }
        },
        {
          "1": {
            "value": 1182.2600001972169
          },
          "key": “008”,
          "doc_count": 19,
          "2-orderAgg": {
            "value": 1182.2600001972169
          }
        },
        {
          "1": {
            "value": 1149.6499925851822
          },
          "key": “009”,
          "doc_count": 18,
          "2-orderAgg": {
            "value": 1149.6499925851822
          }
        },
        {
          "1": {
            "value": 1066.219970703125
          },
          "key": “010”,
          "doc_count": 1,
          "2-orderAgg": {
            "value": 1066.219970703125
          }
        }
      ]
    }
  },
  "status": 200
}

```

---

<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 18, 2017, 8:15pm UTC](https://discuss.elastic.co/t/kibana-bar-graph-shows-incorrect-sums/94158/4 "2017-08-18T20:15:58Z")

</div>

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