I am trying to filter as part of an intersection but can't work out where to add the filter.

The intersection works fine intersects($geometry,aggregate('DSC_Roads','collect',$geometry))

But where can I add filter:="owner" in ('Private','Council') to only work on the 'DSC_Roads' layer when the owner column is in ('Private', 'Council')?

1 Answer 1


You're almoste there - add the filter as last argument of the aggregate() function. According to help for aggregate(), the syntax looks like:

aggregate(layer, aggregate, expression, [filter], [concatenator=’’], [order_by])

[] marks optional arguments

Thus the expression must look like:

        filter:="owner" in ('Private','Council')

Only polygons with owner attribute value = 'Private' or 'Council' are selected: enter image description here

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.