so - your formula as originally stated is correct - tho' you would not normally use domain functions (dsum, scount, etc) in queries - too slow and in other scenarios cannot deliver the levels of complexity
the reason it fails is because you have a left join to the table with the PR ID field - so if such a record does not exist, it will return null. Try either
DSum("[Invoice Amount]","[PR33103]","[PR ID]<=" & nz([PR ID],0))
Strongly recommend you remove spaces from table and field names - they will only cause you problems down the line