How to perform calculations using a field from another content type? I have a spreadsheet as in the screenprint below:







Here are some details about the screenprint above:


I have 2 content types: Product and Invoice.
It consists of 3 datablocks:


Product: a table with 4 columns, and 1 row for each available product, such as the price for each product.
Invoice: a table with 4 columns, and 1 row for each invoice, which includes the total invoice amount, which is the quantity sold for a product, multiplied by the price of the product (derived from the product data block).
Total income per product, which is like a join of some of the columns of the Product data block with the Invoice data block, and to which "Subtotal" and "Page Total" row were added.



Any suggestions about building the equivalent of this spreadsheet in Drupal?
You can go for Views Calc or Views Aggregator Plus

This module adds simple calculations to a views table.

You can SUM, AVERAGE, COUNT, MIN, MAX, or AVG selected columns.