# Need sum Of Value

**URL:** <https://discuss.elastic.co/t/need-sum-of-value/254058>\
**Category:** Logstash\
**Created:** [November 2, 2020, 5:07pm UTC](https://discuss.elastic.co/t/need-sum-of-value/254058 "2020-11-02T17:07:01Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![errupeshmca](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/errupeshmca/32/78285_2.png) [@errupeshmca](https://discuss.elastic.co/u/errupeshmca)\
**Post date:** [November 2, 2020, 5:07pm UTC](https://discuss.elastic.co/t/need-sum-of-value/254058/1 "2020-11-02T17:07:01Z")

</div>

working on calculating Total sales per day,

I have two column in table to calculate total sales per day based on total shipped that day.  
if Total Shipped = 1 and date = today's date.  
I need sum of  
total dollar value

 ![SalesTable](https://us1.discourse-cdn.com/elastic/original/3X/e/5/e525d473c85a2f6df1eb1ef64178fb0504163424.png)

Any Help Appreciated

---

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [November 2, 2020, 5:37pm UTC](https://discuss.elastic.co/t/need-sum-of-value/254058/2 "2020-11-02T17:37:26Z")

</div>

Use an [aggregate](https://www.elastic.co/guide/en/logstash/current/plugins-filters-aggregate.html) filter.

---

<div class="post-metadata">

**Author:** ![Iker](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/iker/32/91708_2.png) [@Iker](https://discuss.elastic.co/u/Iker)\
**Post date:** [November 2, 2020, 5:59pm UTC](https://discuss.elastic.co/t/need-sum-of-value/254058/3 "2020-11-02T17:59:38Z")

</div>

You could create a table visualization, use the filter to get only the products with Total Shipped = 1, and the options for the visualization to get the Total value at the end of the table, otherwise you could use the sum aggregation.

> **[Sum aggregation | Elasticsearch Reference \[7.9\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/current/search-aggregations-metrics-sum-aggregation.html)**

---

<div class="post-metadata">

**Author:** ![errupeshmca](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/errupeshmca/32/78285_2.png) [@errupeshmca](https://discuss.elastic.co/u/errupeshmca)\
**Post date:** [November 9, 2020, 6:33pm UTC](https://discuss.elastic.co/t/need-sum-of-value/254058/4 "2020-11-09T18:33:03Z")

</div>

Thanks Iker, Using filter i can get the values.

---

<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:** [December 7, 2020, 6:33pm UTC](https://discuss.elastic.co/t/need-sum-of-value/254058/5 "2020-12-07T18:33:07Z")

</div>

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