Filter include/exclude

In a table I have a property that is a foreign key. I need to include the property in the filter but I also need to exclude from the filter all the subproperties. Is there a way to do this in a massive way, without the exclusion of each property of the foreign key?

Nobody knows how to do this?