Running Total BAQ

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 (33.0 KB)

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

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/

2 Likes