I am guessing that you are adding the value using the sigma button...that will count for the grouping. what i proposed, though I wasn't as clear as I hoped, was to create a formula with the code. The formula will follow what it's told to do and will ignore the grouping. Though it sounds like you want it to count based on a grouping, just not the immediate grouping.
If you ignore grouping, the value will be the same for all groups, which tends to be confusing to users.
HTH