I would like to create and atlas that instead of displaying all the features within a layer, it only displayed those related to the atlas.
Certainly, I could do as this excellent answer suggests, which is create a rule-based style for the desired layer and create one rule with an experssion like 'field1' = @atlas_pagename
).
Unfortunately, IMHO, this approach has two problems that I would like to overcome:
- No features will be displayed in the canvas outside the atlas
- It cannot be combined with graduated styles.
In order to solve that, I tried to copy a layer and use a filter with the expression 'field1' = @atlas_pagename
and then created a theme that I would use in the layout's map. Therefore, I could use the original layer to edit and visualize from the canvas, and the copied and filtered one for the atlas. Unfortunately, although that makes sense to me, it does not work.
So my question is: is it any way to filter features in QGIS Atlas while being able to see them all in the canvas?