In a layer with point geometry, I have the house number label. Each geometry has the HOUSENUM, PARCEL and STREET fields. In some cases the geometry is duplicated (equal geometry), in some cases the house number attribute could be also duplicated.
I am using the following expression to get the labels avoiding duplicates. But I need to be more precise and take into consideration the groupings by PARCEL and STREET. At the same time this function is not working well as it seems to duplicate labels in some cases.
array_to_string(string_to_array(aggregate(
layer:='HOUSE',
aggregate:='concatenate_unique',
expression:="HOUSENUM",
concatenator:='\n',
filter:=intersects($geometry, geometry(@parent))
)),',')
I am sending a screenshot of the result I am getting at the moment with the display of the attribute table for three different PARCELS, so that you can see the structure of the table and the duplicate values:
PARCEL 00001 and STREET A and B:
PARCEL 00004 and STREET A and B and C:
And I send screenshot of the expected result. I am interested in solving the conflict of duplicated geometries and filtering without duplicates the HOUSENUM texts according to the PARCEL and the STREET to which they belong. Regarding the Placement expected, just show the position to understand the problem.