Filter to exclude certain branches of my tree

(Gramps 5.2.4 on Windows 10 / 11)

I understand the concept of building a custom filter but I’m not very good at doing it.

I can easily filter out most of what I want by finding simply finding the ‘descendant families of [person]’ but that also removes ancestors of spouses of people that meet that criteria. I’d like to include such people, except for me, I don’t want the ancestors of my spouse included.

Does that make sense? If so, how do I assemble a suitable custom filter?

Thanks

Is this filter any help: in Example Filters. example 7.

https://gramps-project.org/wiki/index.php/Example_filters#Example_7._All_people_related_to_me_but_not_my_wife

Thank you, it wasn’t exactly what I needed but it was enough to work out what I did need.

I posted on another thread wanting to do something similar.