Layer A contains terrains knowing that the geometries have been merged when they are contiguous 'and' the owners are identical.
The layer includes a variable indicating the number of slots.

Layer B contains the lands and a variable indicating the type of owner (the lands are not merged as in layer A).
I am displaying layer B with only owner type 'FF'.
I seek to recover in layer A, the number of corresponding housing. (Here 8 et 26 uniquely)
If polygon FF of layer B contains 1 terrain, there will be a label.
If polygon FF of layer B contains several contiguous terrains, there will be more identical labels (I will then see how to retain only one).
I tried without success to apply a display rule in the labels of layer B:
CASE WHEN owner = 'FF' and intersects($geometry, geometry(get_feature('Layer_A','nlogh', nlogh))) THEN nlogh END
I don't know how to retrieve the values




join attributes by location? – Erik Feb 24 '23 at 11:51