To use expressions in labels
If you are theming this feature, there is one entry for each theme rule. Click the entry for a rule that displays labels.
If your layer supports multiple geometry types (for example,point, line, and polygon), scroll down and click the Style cell for the appropriate geometry type.
In either case, you can specify an expression for the content of the label.
If you selected Multiline, use '\n' to insert a line break.
The following example shows a three-line label. It displays the street name on the first line, the area of the parcel on the second line, and the APN code on the third line.
Concat ( STNAME , '\n Area: ', AREA , '\n APN: ' , APN )
The label uses the Concat operator, which combines multiple properties and text strings and can include spaces and line breaks. For more information, see Text Functions.
The static text (in this case, the words “Area:” and “APN:”) are surrounded by single quotes. Including a space after the text strings inserts a space between this static text and the dynamic property that follows it.
The \n entry moves the subsequent text to a new line. The expression results in the following label:
For help with any expression element, see Creating Expressions - Reference.