[GIS] Joining attributes by field value not working

attribute-joinsqgisunique id

I cannot figure out why this join is failing when using the Join attribute be field value tool in QGIS 3.6.

Please see my image below which highlights the two layers attribute table and the criteria used in the tool:

enter image description here

I then get this error saying all features have failed to join:

enter image description here

Some background

  1. The Autoincrimental layer had the PopID field created using the "Add autoincremental field" tool.
  2. Both PopID fields are integers.
  3. The PopID attribute values for the RF layer do not all have a value of zero. I have just ordered them from smallest to largest.

Please see below for the datasets

Dropbox link for test data

Best Answer

Problem is PopID fields are not of the same type.

You can see in layer properties that PopID in Autoincrement layer is "real" and in RF "integer". enter image description here

Algorithm sees "integer" 1 differently than "real" 1 or "string" 1. So, You should convert one of the ID columns. You can do it in field calculator:

enter image description here

This will create new field that you should use to join.

Related Question