# Running Total BAQ

**URL:** <https://www.epiusers.help/t/running-total-baq/56131>\
**Category:** Epicor ERP 10\
**Tags:** baq\
**Created:** [May 24, 2019, 8:13pm UTC](https://www.epiusers.help/t/running-total-baq/56131 "2019-05-24T20:13:32Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![skearney](https://www.epiusers.help/user_avatar/www.epiusers.help/skearney/32/11498_2.png) [@skearney](https://www.epiusers.help/u/skearney)\
**Post date:** [May 24, 2019, 8:13pm UTC](https://www.epiusers.help/t/running-total-baq/56131/1 "2019-05-24T20:13:32Z")

</div>

I am trying to do a BAQ with a running total. The column I need as a running total is called “Month To Date Shipped”. I exported the BAQ so if anyone could help me I would appreciate it.  
[GS\_RPT\_Daily\_Invoices.baq](https://epiusers.help/uploads/default/original/3X/9/4/944a5cb3813c9d7e9a5c7e864244ab9949e45e38.baq) (33.0 KB)

---

<div class="post-metadata">

**Author:** ![skearney](https://www.epiusers.help/user_avatar/www.epiusers.help/skearney/32/11498_2.png) [@skearney](https://www.epiusers.help/u/skearney)\
**Post date:** [May 24, 2019, 8:14pm UTC](https://www.epiusers.help/t/running-total-baq/56131/2 "2019-05-24T20:14:19Z")

</div>

This is what I am getting in the results, as you can see it isn’t adding each line to each line:

 ![image](https://epiusers.help/uploads/default/original/3X/7/5/7532c09520c68f4503b42914515a7664beb41559.png)

---

<div class="post-metadata">

**Author:** ![Banderson](https://www.epiusers.help/user_avatar/www.epiusers.help/banderson/32/50875_2.png) [@Banderson](https://www.epiusers.help/u/Banderson)\
**Post date:** [May 24, 2019, 8:16pm UTC](https://www.epiusers.help/t/running-total-baq/56131/3 "2019-05-24T20:16:31Z")

</div>

`sum(shippedDollars) over (partition by *somecommonvalue* order by WorkingDay)`

You should probably put a month in there, or something. You’ll need something for a partition.

[https://drill.apache.org/docs/sql-window-functions-introduction/](https://drill.apache.org/docs/sql-window-functions-introduction/)
