Thanks, Your input clarified things. I was able to get the running sum working with Add and Minus (using negative numbers for minus) which worked for my requirements. I used the Northwind database example as well as your posting to help me 'get my head' around it, and get my own code working...
Hi. I'm trying to get a running total in my query as per the example below. So dependant upon the Release Status it will either add the value to the RunTotal Sum or Minus the value from the RunTotal. I hope this is clearer.
Tag No Outlook Date Tag Status Final Release Date Release...
Thanks but it now gives the following error: "Subqueries cannot be used in the expression (IIf(IIf(Not [Final Release Date]Is Null, "Completed", "Active")="Active",[TagCount],([TagCount]*-1)))"
I'll have to leave it for tonight and check for any follow up, am keeping eyelids open with...
Sorry meant to say I was trying your solution. Unfortunately I get the following error: "Cannot have aggregate function in GROUP BY clause Sum(IIf([releaseStatus]="Active",[TagCount],([TagCount]*-1)))
Oops sorry - a piece of vital information missed out. I want to get a running sum on the Tag Count, and if it is Active then 'add' the value, but if the tag is Completed, to 'minus' the count value. Hope this is clear enough. Thanks, BJ.
Hi
Referring to "How to get a Running Sum in Queries" faq701-5268
I need assistance to get a running sum on my query, but with a twist. I need to have the running sum add or minus the value based on criteria of another field. The running sum will be used to produce a bar chart. Here's my code...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.