I have created a field called 'Name' in QGIS and I wish to create a rule-based style for a gridded vector. The grids are either 'NEP1' or 'NEP1NRG' etc. with values to 5000+. I want a rule to colour the grid polygons with 'NRG' in the 'Name' field one way, and those without this in the name another. E.g. If "Name" contains 'NRG' then adhere to style rule, if not then another.

I have tried variations of LIKE but not sure this is appropriate.


This should work

Name LIKE 'NRG%'


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.