This question already has an answer here:
I have a vector shapefile map that is divided into polygons. I want to add 2 columns to the attribute table with the eastings/northings coordinates of each polygon centroid.
So far what I've tried is:
menu > Vector > geom tools > polygon centroids
This gives me the centroids, but as a new layer. What I cant figure out how to do is to merge this layer with the original.
There is a command: menu > vector > join attribute by location.
But what I want is, I guess, 'join by attribute column' or something.