Opposite result views with comparison
Previous setup:
Create a new computed field for the content type where you want to work:
Extract the names from the multivalue field (entity referenced field)

foreach ($entity-&gt;field_campos as $field) {
} 
foreach ($entity-&gt;field_campos as $field) {
} 
foreach ($field as $index =&gt; $valores) {
$terminos[] = $valores['value'];
}
$item2 = field_collection_item_load_multiple($terminos, $reset = FALSE);

$referenced_titles = array(); 
foreach ($item2 as $indice =&gt; $values) {
  $referenced_node = node_load($values-&gt;field_nombre_2['und'][0]['target_id']);
$entity_field[]['value'] = $referenced_node-&gt;title;
}


Now that every node from this content type has a special field for extracting the values in a more "flat" way we can compare two views.
The first with the name list (usually partial) and the second, a views containing the full name list.

&lt;?php
$result = views_get_view_result('calendari_intern', 'nombres');
$result2 = views_get_view_result('nom_expedients', 'entityreference_1');


First load both arrays. The first one, is the view result with partial name list. The second, is the view of the full name list.

Extract and create a new array saving only the names from the arrays:

foreach ($result2 as $index =&gt; $val) {
$expedient[] = $val-&gt;node_title;
}


Do the same in the other one:

foreach ($result as $index =&gt; $values) {
$entidades[] = $values-&gt;_field_data[nid][entity];
}
foreach ($entidades as $indice =&gt; $valores) {
if ($valores-&gt;field_nombres[und] !=NULL)
$casi[] = $valores-&gt;field_nombres[und];
}
foreach ($casi as $indice2 =&gt; $valores2) {
 foreach ($valores2 as $indice3 =&gt; $valores3) {
if ($valores3["value"] != NULL) {
$misnombres[] = $valores3["value"];
}
}
}


Then compare the arrays with array_diff function.

$diferencia = array_diff($expedient, $misnombres);
echo '&lt;pre&gt;';
print_r ($diferencia);
echo  '&lt;/pre&gt;';
?&gt;