Running Total (1 Viewer)

itownson1

Registered User.
Local time
Today, 03:37
Joined
Mar 20, 2019
Messages
43
It is only sample data I have put in, so can add more data to get the running total.

Where would I add the "product" to the summing criteria for it to group by "product"?

RunningSum: Sum((Select Sum([QtyAdjusted]) from [QCombinedInventory] as a where a.[Timeadjust]<=[QCombinedInventory].[Timeadjust]))
 

Gasman

Enthusiastic Amateur
Local time
Today, 10:37
Joined
Sep 21, 2011
Messages
14,050
As I mentioned, if you group the data, I do not think you will ever get a running sum as there will only ever be one record per group, unless you group by other fields, but then a running total is not really going to make any sense, to me at least.? :confused:
 

itownson1

Registered User.
Local time
Today, 03:37
Joined
Mar 20, 2019
Messages
43
Ok, Just to throw an absolute curve ball into the mix here.

I have realised I can do a running sum in a report that will work with a filter in the query.
The only issue is it doesn't work with [Qty] but will work with every other field such as GoodsID.

Why does Access hate me so much?!?!?
 

itownson1

Registered User.
Local time
Today, 03:37
Joined
Mar 20, 2019
Messages
43
I don't understand why there would be one record per group.
If I group by product that product would have numerous "Goods In" and "Production" data to create a running sum.
At the moment I have it working for all products, but I want to be able to filter it to one specific product to check on the stock.
 

Gasman

Enthusiastic Amateur
Local time
Today, 10:37
Joined
Sep 21, 2011
Messages
14,050
I can only guess that Qty is somehow defined as text/date, anything that cannot be summed.?

Upload a sample DB.?
 

Users who are viewing this thread

Top Bottom