[GIS] Color rules expressions

qgis

I am blocked on trying to work with Layer Properties Rule-based Expressions.

For a simple example in expression string builder:
I have a column field named HOUSE.
A list of values within that field show SMALL, MEDIUM, LARGE.
What rule expression would I use to allow different colors for each of the values?

I tried this:

CASE WHEN "HOUSE" = 'SMALL' THEN color_  rgb(255,0,0) END

but got this message:

Parser Error: syntax error, unexpected COLUMN_REF, expecting WHEN or
ELSE or END Eval Error: No root node! Parsing failed?

Can someone please reply with a correct expression I can use?

Best Answer

You just need to use the Categorized" symbolic method on HOUSE A, this way, you will have a different symbolic on each size of house.

house size

If you really need to get the rule based style on your different types of attributes for other reasons, first do the categorized, apply, then select "rule based", the filter will already have been entered by the software :)

house size rule based