There are a few solutions. First is to add calculated fields to your entity. Just create a Total property, set a getter for it and calculate the total based on the getter. Then make such property available in JSON by adding XDataJsonProperty attribute to it. An example:
Another option is to create your own DTO class (TMyDTOEntity) and return it from a service operation. Then create and fill its properties manually from TMyEntity, and fill in the missing properties accordingly.