I was wondering how I would go about giving each row of data within a layer a unique colour, each row does have a unique ID but I can't figure out how to use this to achieve what I'm after without using the rule-based symbology and writing out a rule for each row.


1 Answer 1


I think rule based renderers is shot right past the target for what you are after. Better use categorized renderers for such application.

Right click on the layer, got to layer properties | Symbology. At the top select "Categorized". Right below select the column that contains your unique ID. Then at the bottom hit "Classify":

enter image description here

Screenshot is taken from QGIS 3.6, but in 2.18 it's all the same.

You may change symbol and color ramp according to your needs.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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