I've got a map composer in QGIS with a polygon layer (attributes: code, area).
I want to add a legend with the codes and the total area for each code. I used the following expression (wrong, as it happens) in the Expression string builder:
@symbol_label || ' ' || '(' || "area" || ' ha' || ')'
And in the legend, this is what I get
How can I get what I want?