Awk :
awk 'function get_mask(keys){
mask="";
for(i in h) {
res=(keys~i)?"Yes":"No"; mask=(mask!="")? mask FS res:res
}
return mask
}
{ k=$1 FS $2 FS $3 }{ h[$4]; a[k]=(a[k])? a[k]$4:$4 }
END{
h_line=""; for(i in h) h_line=(h_line=="")? i:h_line FS i;
printf "Name Value1 Value2 %s\n",h_line;
for(j in a) printf "%s %s\n", j, get_mask(a[j])
}' file{1,2,3}
A saída:
Name Value1 Value2 A B C
Z 1 50 Yes Yes Yes
Y 101 200 Yes Yes No
Y 200 300 No No Yes
X 1 100 No Yes Yes
X 200 300 Yes No No