While I usually recommend and support the transfer of these types of calculated fields to the presentation model (as is usually the case where they belong), there are times when you work with data where it is difficult to add additional calculated properties. For example, if you group your data in a view. In this case, you can still display your total, but move the calculation to the view:
<td data-bind="text: $data.reduce(function(x,y) { return x + y.Amount(); }, 0)"></td>
source share