Help with Running Total Logic in Part Transaction History Tracker (BAQ)

Dear EpiUsers,

I’m trying to understand how Epicor calculates the Running Total in the Part Transaction History Tracker screen. I’m currently working on building a report based on BAQ to replicate this logic.

One key requirement is that the running total should be calculated based on a cutoff date, so only transactions up to a specific date are considered.

Could anyone share the logic or approach Epicor uses for this calculation? Any insights or suggestions would be greatly appreciated.

Thanks in advance!
Dnyanraj Patil

In the PartTran record, there is a BeginQty and an AfterQty. I imagine you could find the last AfterQty on the previous day and use that as a starting point and then add/remove the delta between those fields.

As for doing the running total, you can use Window Functions in SQL as done here:

1 Like