# Need help displaying two different counts on the same chart

**URL:** <https://discuss.elastic.co/t/need-help-displaying-two-different-counts-on-the-same-chart/259264>\
**Category:** Kibana\
**Created:** [December 21, 2020, 2:07pm UTC](https://discuss.elastic.co/t/need-help-displaying-two-different-counts-on-the-same-chart/259264 "2020-12-21T14:07:26Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![njanashia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/njanashia/32/81192_2.png) [@njanashia](https://discuss.elastic.co/u/njanashia)\
**Post date:** [December 21, 2020, 2:07pm UTC](https://discuss.elastic.co/t/need-help-displaying-two-different-counts-on-the-same-chart/259264/1 "2020-12-21T14:07:26Z")

</div>

I want to display sales and refunds counts for the same day on the same chart like it is shown on the first picture. The corresponding date fields for sales and refunds are `detail_trans_date` and `detail_refund_date`.  
I have added new column for refunds but I want it to be counted by `detail_refund_date`.

I tried to add the following script to the JSON Input:

```auto
{
  "exists": {
    "field": "detail_refund_date"
  }
}

```

but nothing has changed.  
Any advice on how I can achieve this is appreciated, thanks!

Kibana version is: 5.5.2

 ![Screen Shot 2020-12-21 at 17.51.57](https://us1.discourse-cdn.com/elastic/original/3X/d/6/d677e7522592e89a3e7ebb2200863e38d561a342.png)  
 ![Screen Shot 2020-12-21 at 18.03.37](https://us1.discourse-cdn.com/elastic/original/3X/5/4/549094f98a631a642829701d816e069d3ce2cb34.png)

---

<div class="post-metadata">

**Author:** ![Mohammad\_Mousavi](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/mohammad_mousavi/32/56508_2.png) [@Mohammad\_Mousavi](https://discuss.elastic.co/u/Mohammad_Mousavi)\
**Post date:** [December 21, 2020, 3:54pm UTC](https://discuss.elastic.co/t/need-help-displaying-two-different-counts-on-the-same-chart/259264/2 "2020-12-21T15:54:24Z")

</div>

Try this: Click on "Add a filter ", then on Field select **detail\_refund\_date** and the Operator would be **exists**.

---

<div class="post-metadata">

**Author:** ![njanashia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/njanashia/32/81192_2.png) [@njanashia](https://discuss.elastic.co/u/njanashia)\
**Post date:** [December 21, 2020, 8:08pm UTC](https://discuss.elastic.co/t/need-help-displaying-two-different-counts-on-the-same-chart/259264/3 "2020-12-21T20:08:57Z")

</div>

Hello, thanks for your reply. I tried that but the result is not much different, it just filters out any entries that don't have refunds. See the result in the attached image:

 ![Screen Shot 2020-12-22 at 00.06.14](https://us1.discourse-cdn.com/elastic/original/3X/b/1/b17c91f6fafc7b9d2107089d8c4666b276d6dbd6.png)

---

<div class="post-metadata">

**Author:** ![njanashia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/njanashia/32/81192_2.png) [@njanashia](https://discuss.elastic.co/u/njanashia)\
**Post date:** [January 4, 2021, 1:40pm UTC](https://discuss.elastic.co/t/need-help-displaying-two-different-counts-on-the-same-chart/259264/4 "2021-01-04T13:40:37Z")

</div>

I fixed it by adding two filters  
See the attached image

 ![Screen Shot 2021-01-04 at 17.36.09](https://us1.discourse-cdn.com/elastic/original/3X/d/b/db9326b1ab650071ba0b6b52af163bdf0f3b86be.png)

---

<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:** [February 1, 2021, 1:40pm UTC](https://discuss.elastic.co/t/need-help-displaying-two-different-counts-on-the-same-chart/259264/5 "2021-02-01T13:40:38Z")

</div>

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