<html><head></head><body>Hello,<br><br>I assume in your expression, you are using the same 'Points' layer as input and target, meaning that feature Id=1 in the layer you are filtering is overlaid with itself in the target layer (hence always 1). The solution would be to add a filter expression that ignores the overlaying feature for each but that function does not do that by default. You may want to see discussion at <a href="https://github.com/qgis/QGIS/issues/42071;">https://github.com/qgis/QGIS/issues/42071;</a> there's a suggestion of code at the end you can try to adapt.<br><br>Another process could be to:<br>- Create a buffer of 1000m for the points<br>- Do the overlay_nearest call between the points and the polygon, with an expression returning count of overlapping polygons for each point<br>- Extract features that have more than 1 buffer overlapping (or the inverse)<br><br>Hope that helps,<br>Harrissou<br><br><div class="gmail_quote">Le 30 janvier 2022 17:45:05 GMT+01:00, krishna Ayyala <ayyalakrishna@gmail.com> a écrit :<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div dir="ltr"><p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">Hello,</p>

<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">I am re-posting this question. I have a point shape with
about 1000 points. On the map, I wish to show only those points that are within
1000ft of each other and drop the rest of the points.</p>

<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"> I have used the
"overlay_nearest" formula for my points layer. Irrespective of
whatever number I assign for "max_distance" I am getting the value 1
for the new field for all the 1000 records of the points layer. i.e. I am not
getting 0 value for any of the records. I tried for various distances starting
from 1 upto 1000. For ex:1,5,10,100,500,1000 etc. I am getting the value only 1 for all the records of the new field. My map units are set to meters.</p>

<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">I have used the below formula and changed the max_distance to
different values as mentioned above. I am herewith attaching the points
shapefile again.</p>

<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">overlay_nearest('Points',max_distance:=1000)</p>

<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"> </p>

<p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif">Regards.</p><p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><br></p><img src="cid:ii_kz1hnovd3" alt="image.png" width="153" height="329" style="margin-right: 0px;"><p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><br></p><p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><br></p><p class="MsoNormal" style="margin:0in 0in 8pt;line-height:107%;font-size:11pt;font-family:Calibri,sans-serif"><br></p></div>
</blockquote></div></body></html>