<div dir="ltr"><div><div><div><div><div><div>Hi,<br><br></div>I have a polygon layer and a point one.<br></div>I'd like to calculate for each polygon feature, the number of points that it covers. I thought the aggregates functions could help me find an easier and straight expression to perform this (without creating intermediate layers) but I fail to find any correct syntax. <br><br></div>I tried aggregate ('mypoint', 'count', "id", intersects ($geometry, geometry($currentfeature)))<br><br> And many variants of the fourth option but It always return the total of points or an error. Actually this option is a filter and I wonder if i'm not missing a "group by" option in the aggregate function (which seems to be the appropriate one in my case). Is it possible?<br></div><br></div><div>The work around I found is to populate an ad'hoc field in the point layer with overlapping polygon id, thanks to the SpatialJoin plugin, then I create a one-to-many relation in the project between the two layers in other to use relation_aggregate function.<br></div><div>But I expected something more direct.<br></div><div><br>Any hint, please?<br><br></div>Thanks,<br></div>Harrissou<br></div>