G
Gale
Hello,
Here is an example of my data:
COUNTER PRODUCT DATE GALLONS
1 HEATING OIL 5/3/04 10,000
2 HEATING OIL 5/5/04 20,000
3 HEATING OIL 5/6/04 5,000
4 GAS 5/3/04 7,000
5 GAS 5/3/04 8,000
6 KEROSCENE 5/6/04 3,000
I am trying to get a running total for the gallons,
by product by date. My new column should be:
TotalGallons
10,000
30,000
35,000
7,000
15,000
3,000
I have tried using the following expression (as well as
many variations) but the results are either close or I get
a message saying there is a missing operator:
TotalGallons: DSum("[VOLUME]","[BULK PURCHASES -
CONVERTED FOR FIFO]","[MOVEMENT DATE] =#" & [MOVEMENT
DATE] & "# AND [PRODUCT] =" & [PRODUCT] & " AND [COUNTER]
<=" & [COUNTER])
My problem seems to be with the Product field in the
expression. If I take it out or use it by itself but say
[PRODUCT] = 'HEATING OIL', for example I can get a result,
but I need it for all products.
Any help would be appreciated, especially if it doesn't
involve using code.
Thanks!
Here is an example of my data:
COUNTER PRODUCT DATE GALLONS
1 HEATING OIL 5/3/04 10,000
2 HEATING OIL 5/5/04 20,000
3 HEATING OIL 5/6/04 5,000
4 GAS 5/3/04 7,000
5 GAS 5/3/04 8,000
6 KEROSCENE 5/6/04 3,000
I am trying to get a running total for the gallons,
by product by date. My new column should be:
TotalGallons
10,000
30,000
35,000
7,000
15,000
3,000
I have tried using the following expression (as well as
many variations) but the results are either close or I get
a message saying there is a missing operator:
TotalGallons: DSum("[VOLUME]","[BULK PURCHASES -
CONVERTED FOR FIFO]","[MOVEMENT DATE] =#" & [MOVEMENT
DATE] & "# AND [PRODUCT] =" & [PRODUCT] & " AND [COUNTER]
<=" & [COUNTER])
My problem seems to be with the Product field in the
expression. If I take it out or use it by itself but say
[PRODUCT] = 'HEATING OIL', for example I can get a result,
but I need it for all products.
Any help would be appreciated, especially if it doesn't
involve using code.
Thanks!