I have a file with many labels to show on a map. However, I want to prioritize the label by it's data. Example if my data says 3000 people live in a city, I want to prioritize this over the one that have 200. Is this possible?

1 Answer 1


You need to use data-driven label priority, in the layer's Label settings, Placement sub-tab.

There's a slider for Priority there which sets priority for all the label of the layer, but to its right is a Data-driven icon where you can set priority for each feature's label determined by its specifics.

In your example, if you have no other labeled layers in your project, you could simply set this to be data-driven based on the city's population attribute. Then cities with higher population "win out" when there is only space for selected labels somewhere.

If you do have other labeled layers, you'll have to tweak their priorities too, otherwise they will be beat out by villages with population of handful of people. You can either manually set those layers' labels to be really high priority too, or you can change the data-driven priority of the cities layer to be some QGIS expression based on population. For instance, some logarithmic transform of the population might get you closer to what you need with fewer tweaks on other layers.

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.