I'm working with QGIS 3.16 Hannover.
I've got one layer with all Spanish provinces (
provincias) and, on top of it, several layers with the regions (
AST...). Each province pertains to one region and each region may contain one or more provinces.
I want to label the
provincias layer with different opacity, depending on whether their region layer is visible or not. Here is where I try to set the differential label opacity
And this is the result I intend to achieve (layer
And I've tried the following code, without success:
case when (overlay_within('AND') and is_layer_visible('AND')) then 50 when (overlay_within('ARA') and is_layer_visible('ARA')) then 50 [...] else 20 end
It only works with the first region, and this is what happens when I make visible the next one (