I am trying to make a thematic layer using the attributes from my now main table which were previously joined.

I would like it to look something like this: enter image description here

As visible in picture, the columns starting with Gotenburg, Gothenbu_1 etc are in the table joined. enter image description here

But when I try to create categories based on its values, I do not have the option to use those attributes. As seen in next photo.

enter image description here

  • 1
    Can you try Categorised symbology and see if the joined columns show up there? If they do, then the join has worked - maybe the columns in your original table were text data type (despite the data being numeric - this can happen when joining csvs for example). Text columns may not show up under the Graduated symbology drop down list (which typically only shows numeric types). – she_weeds May 5 at 0:37
  • Hi @she_weeds. Yes, they show in Categorised symbology. And the joined columns are described as string in info. So how can I then use the Graduated? There is a high entry of values in this tables, and I would like to have some categories from 0 to highest. I tried How to change the type of a column of an attribute table in QGIS? but the refactored layer still has values as string. – Julija M May 5 at 7:11

To apply Graduated Symbology to numeric values with a text/string datatype, you can perform an in-place conversion using the to_int() (for integers) or to_real() (for decimal values) function in the expression builder.

Next to the drop-down box for selecting columns there is a little ε symbol. Click on that to open the Expression builder and use one of the above functions like so: to_int("Gothenburg")

Note however this can be memory intensive depending on the size of your dataset as it is (a) joining data and (b) converting its type. If you want to permanently change the datatype to numeric but retain the join, you need to change the way the source data is read in QGIS. If your source data is a CSV try adding it to your project using Add Delimited Text Layer rather than dragging and dropping (which will interpret all columns as text/string)

  • So this did not work unfortunately. The thing is I have one joined layer, made by drag and drop. Because adding the delimited text layer did not separate columns, all the attributes were in one merged. When I wanted to do suggested on that layer, it does not even offer me the joined columns in that small drop down box. Then I checked in properties, and they are there. So I am confused. – Julija M May 5 at 17:00
  • Second from this layer I have made another one, which was intersected with buffers, and that one contained all the joined attributes (I just do not remember if I have made a join again), and they are visible in drop down box, to_int("Gothenburg") was done but still in Graduated I do not see the needed attributes. :( – Julija M May 5 at 17:00
  • Did you remember to click Classify after putting in to_int("Gothenburg")? It won't show the symbology until then. As for your first comment I don't exactly understand what you mean but I think you need to try the Add Delimited Layer option again and use the correct delimiter (you can open your CSV with a text editor like Notepad to see what delimiter is used to separate your data - space, comma, tab....) – she_weeds May 5 at 21:08
  • I ended up redoing my whole work. I joined the table by Delimited Text. But as I am Mac user, my csv needed to be imported with ''custom delimiters and semicolon''. So it work as you said in the end. Thank you – Julija M May 6 at 5:06

Your Answer

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.