My guess would be that [TotalPrice] is a calulated field, and you cannot run Aggregate Functions, such as SUM, against a calculated field! You have to run them against the Expression used to do the calculation. In other words, if
A + B = C
you cannot use
SUM(C)
but have to use
SUM(A + B)