Gantt View, how to include all parent items but show only specific sub items?

When using the advanced filter, I want to apply a filter to only subitems. In other words, I want to see all parents, but only subitems where x is true. How can I achieve this?