Related Content View with multiple Entity Reference Fields I am trying to create a View to display related content based on shared taxonomy terms from multiple vocabularies.

For example:

I have two content types called Car and Parts.

I have two vocabularies called Type and Country.

Content Types:


Car


Entity Reference: Type
Entity Reference: Country

Parts


Entity Reference: Type
Entity Reference: Country



Vocabularies


Type: sedan, convertible, coupe, van, suv
Country: usa, japan, germany


I would like to display a view of related Parts when viewing a Car node.  Furthermore, I only want to display if both Type and Country match.

I’m able to get either Type or Country matches to display by adding the following relationships.


Content: Taxonomy terms on node
(term) Entity Reference: Referencing entity (type)
(term) Entity Reference: Referencing entity (country)


and a contextual filter of:


(Content referencing Taxonomy term from field_country) Content: Nid


Basically, switching the relationship on the contextual filter determines whether or not Type or Country matches should be displayed.  I am having trouble figuring out how to display Parts that match both the Type and Country of the Car.
Basically you need to do the following.


Create a view based on content of type parts (as a block I'm guessing)
Add a relationship "Content: Country (field_country)" using the defaults
Add a relationship "Content: Type (field_type)" using the defaults
Add a contextual filter for "Taxonomy term: Term ID" with the following settings.


Relationship: country
Provide default value: Taxonomy term ID from URL
Load default filter from node page, that's good for related taxonomy blocks
Limit terms to vocabulary: Vocabularies country.
Multiple-value handling: Filter to items that share all terms

Add another contextual filter for "Taxonomy term: Term ID" with the following settings.


Relationship: type
Provide default value: Taxonomy term ID from URL
Load default filter from node page, that's good for related taxonomy blocks
Limit terms to vocabulary: Vocabularies type.
Multiple-value handling: Filter to items that share all terms.



Now just place your block on all car pages.