ah, that makes sense.
well any approach could be good. sum is the most straightforward, but other summary types like mean or stddev could make sense too.
safest bet is to use a sum, and reset the sum in line with your bar interval.
if you want to be exhaustive, test both (sum+average+ whatever else you like) and see which ones give you the results you want, or is easier to interpret, etc.
hope that helps.