Calculate values from multiple content items
did you try to use the Aggregate option (use SUM field aggregation option) and Views Calc at the same time ? That might do the trick.



If not, you can use a PhP block (you have to send it the engine node id, I hope you use Panels or node.tpl.php).

Then, the code would be (I guess) ;

$engine_usages_nids = db_select('yourentityreferencefield', 'n')
  -&gt;condition('entity_id', $the_engine_nid, '=')
  -&gt;field('n', 'field_yourentityreferencefield_nid')
  -&gt;execute()
  -&gt;fetchCol;

$myfields_values = $db_select('field_data_hoursuagefield', 'h')
    -&gt;condition('entity_id', $engine_usages_nids, 'IN')
    -&gt;join('field_data_mileagefield', 'm', 'h.entity_id = m.entity_id)
    -&gt;fields('h', array('hoursuagefield'))
    -&gt;fields('m', array('mileagefield'))
    -&gt;groupBy('h.entity_id')
    -&gt;execute()
    -&gt;fetchAssoc;

$total = 0;
while($record = $myfields_values) {
  $total = $total + intval($record['hoursuagefield'])*intval($record['mileagefield']);
}

echo($total);


This is all made by heart, I advise you to double-check :)

Have fun !