I am trying to get specific attributes from a line layer to a polygon layer. The line layer contains a number of pipes that run through a polygon (parcel). They both have the parcel number in common:
The darker the color, the more pipes are within that part of the line layer. I now want to transfer the HIGHEST number of pipes into the polygon layer. What I tried so far was "Join attribute by position" - which is kind of the tool I am looking for. However, this tool is either tranfering the attribute of the first line intersecting the polygon or the one with the most length in it. There is no way to add an expression that lets me filter for the most number of pipes. Any ideas?
overlay_contains(layer:='line_layer_name', expression:='needed_field_name', filter:=is_selected())