I would like to have two types of text in my layer.
I have one value in the data attribute table, which is "Timestamp" and its value is 0 or 1. 1 for bigger and black font, 0 for the smaller and grey font. The value I want to be displayed is "description".
I tried several approaches, which are here:
Single text label in dual font size in QGIS
How to create a label combining different font sizes or types?
Single text label in dual font size in QGIS
and finally, I used this one:
Setting different font color types from the same field in rule-based labeling in QGIS
which works fine when considered the cont color only.
I tried to set up two separate conditions based on the same columns in the data attribute table (timestamp for font condition and description for value displayed).
but it didn't work as expected.
Finally, I tried the formula:
CASE WHEN "Timestamp" = 1 THEN
'000000' AND 12
ELSE
'808080' AND 7
END
and text partially disappears.
What problem can be here?
CASE WHEN "Timestamp" = 1 THEN 10 ELSE 5 END
for the font size.AND
's in yourCASE
statement?AND
is a conditional operator and is likely a syntax error how you are using them. If you want to concatenate, you can use||