I've two thing that I joined, a shapefile of PollingStation and a csv of the results of the election. When I join them by the right field, I get a new table with all the information I need.

enter image description here

My problem is when i go to the layer properties and I choose a graduated map I can't choose field from the dataset I add.

enter image description here

I've seen that my data are as string for the dataset I add, and as double for the original.

So i extracted again my data from R, but this time I first set it as characterto be sure. But when I joined it's always string.

I tried to refactor with the refactoring field tool, so I set all as double,

enter image description here

the tool says that it worked

enter image description here

but when I open the properties my data are always as string.

enter image description here

So Basically what I need is a way to join my data and make the field from the dataset I add usable for a graduated map.

1 Answer 1


One quick and lame solution is to use expression and do the type conversion using something like :


(or to_real)

Then your symbology is set not on the "direct" field value but on a calculated version of the field and should work ...

Another solution is to setup a .csvt file which will define the type of each field of your .csv (some help : How to Specify Data Types of CSV Columns for Use in QGIS) ...


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.