I'm working with QGIS 3.22. I have two layers of points (layers A and B), and I know how many points of layer B are within a fixed distance from each point of layer A.
I updated a field of layer A with this number using the aggregate function in the field calculator. Refer to Counting number of points in one layer within fixed distance to points in another layer in QGIS.
I would also like to know how to sum the values of one numerical field of layer B for only the points that are within the fixed distance for each of the individual points of layer A. In other words, if Point#1 of layer A has 10 points of layer B within the fixed distance, I would like to make a new numerical field in layer A where summing the numerical values of the 10 points of layer B taken from a chosen field, and repeat this for all the points of layer A with the associated points of layer B.
sum()
with theaggregate()
expression which was added as an answer to the linked question and with the field you want to sum up as input.