I've been looking at the other questions relating to rule based labeling but I haven't found any answer to my query. I have polygons with average literacy rate for each canton of a country and therefore have a field named "LitRate". I'd like to show cantons with a rate higher than 5. Getting inspiration from other questions I've tried: "LitRate"= > "5" but it doesn't work.
Okay, your approach points in the right direction, but has the wrong syntax. Please note that you can test rules and that the help in the field calculator/expression builder is worth consulting.
= > instead of
>= - QGIS doesn't know how to deal with two operators right after the other.
"5" - things in
" always refer to columns, not to values. When comparing numerical values you can omit the quotation marks, otherwise if you want to compare to a value/string of characters, use
Which leads to the following expression, which ought to work:
"LitRate" >= 5