I´ve got some polygons that I want to colourize by multiple columns. Can this be done or will I have to edit the attributes? Some polygons only have data-attributes in 1 one column, where as other have data in both column 1,2 and 3. I´m thinking of the concept like the pie chart function in the diagrams-function in layer properties. In this case I want my polygons splitted in colors by the values in the columns.
Asked
Active
Viewed 1.0k times
2 Answers
4
If I understand you correctly, your polygons will be colored based on multiple data columns. There are two ways to do this:
- Create a new data column and use the field calculator to classify your polygons based your data
- Use rule based styling (preferably!). This is a complex topic, but this excellent blog post will get you started, and there is additional online material available, e.g. by linfiniti or even QGIS' documentation (use search).
SAnderka
- 1,429
- 12
- 19
3
You can define rule-based symbology, which then allows you to create the rules using the usual QGIS expression builder.
In this example, I created just 2 rules, one with one field, the other with two fields.
You open the expression builder with .... in the Rule properties window.

HDunn
- 8,626
- 3
- 40
- 71