1

Total QGIS noob here who started using the software last night, I've looked all over SE for a solution but nothing helped.

I joined a shapefile to a CSV. The join field is 'market_number', target field is an area number column on the shapefile. However, looking at the attribute table on the shapefile only one 'market_name' shows when the csv source has multiple i.e. there is one of San Diego, Tucson when there are two. Is this by design or am I doing something wrong?

enter image description here

Also, could areas on the shapefile layer change color when a 'market_name' like Tucson has multiple 'block' listed given that the field is only letters? I messed around in Open Fields Calculator and 'block' field now shows as numbers in the Expression String Builder but then what?

3
  • 1
    Do I get it right: You have multiple entries with the same market_name and market_number in the original file, but on joining you loose some of these? Also: You ask two questions in this thread, which makes it hard to answer. This forum works a bit different from others. Here is a guide to asking good questions: gis.meta.stackexchange.com/questions/3349/… Aug 9 '21 at 4:31
  • 2
    The join field is supposed to be unique so that each value appears only once in both datasets to be joined. You can process your CSV data so that it has several block fields instead of several rows: market_number, market_name, block_1, block_2. Or write all blocks as a list A,B into one field.
    – user30184
    Aug 9 '21 at 6:41
  • As user30184 points out, this is probably what is supposed to happen. You could add an additional column with a unique ID for each entry before you perform the join. That should solve the problem as well. Aug 9 '21 at 7:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.