Filter referenced item without losing other content I have 2 entity types Content type A and B.
Content type B has a date field and an entity reference to A.

I need a view that shows all the nodes of content type A
But also shows all the referenced content, until this point I have no problem.

The only problem is that the content type B needs a filter to only show the content from this year. But when I add a filter to the date field all the nodes that don't have an entity reference also get filtered out.

Content type A are assets

Fields:


Title
Address
lat/long


Content type B is the maintenance of these assets

Fields:


Title
Entity reference to A
date field


Now I want to show all the assets in a view.( also the ones that don't have maintenance done)
In the same view there should be a column with all the maintenance within a certain timespan.

When I have this view i can put these on a google map and show which assets need maintenance and which are already done
As what I understand your needs its very simple.

You have to set the filter criteria in the views:


Add Content Type A
Add Content Type B
Add Published field twice
Add Date Field and set its criteria as you already set
The field (Entity Reference field in Type B) that reference to Type A and set its operator as Is not empty (NOT NULL)
Now, Open re-arrange the filter criteria fields



 7. You need to Create new filter group under the filter criteria and drag drop your fields in required group like below



I hope this will at least give you an idea how to filter different content types with different field(s).

Thanks