DSUM Criteria Help (1 Viewer)

feinj

OracLegend
Local time
Today, 06:37
Joined
Oct 17, 2007
Messages
42
Need help creating a DSUM Expression that will summarize quantities in a Domain where the Item is the same in the Item column.

The Table being used as the domain contains several items, but I want a Running Sum for each item in the Domain, assuming they are all sorted in order of item and quantity ascending. The Domain Table has consecutive ID Numbers.

RunningSum: Abs(DSum("OpenQty","Shared Responsibility SO Lines Tbl","ID <=" & [ID]))

The expression above summarizes the OpenQty column for all items. I want to restart the sum in the query when the item changes in the item column

Please give me some your help.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 06:37
Joined
Aug 30, 2003
Messages
36,140
Along the lines of:

"ID <=" & [ID] & " AND Item = " & [Item]

presuming Item is a numeric field.
 

feinj

OracLegend
Local time
Today, 06:37
Joined
Oct 17, 2007
Messages
42
Item is a Text Field.
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 06:37
Joined
Aug 30, 2003
Messages
36,140
Try

"ID <=" & [ID] & " AND Item = '" & [Item] & "'"
 

feinj

OracLegend
Local time
Today, 06:37
Joined
Oct 17, 2007
Messages
42
Thanks Paul. That worked really great.

Jerry
 

pbaldy

Wino Moderator
Staff member
Local time
Today, 06:37
Joined
Aug 30, 2003
Messages
36,140
Happy to help Jerry!
 

Users who are viewing this thread

Top Bottom