I have been using QGIS 3.28.0 and want to be able to concatenate the attribute values from differing features into the same label with each concatenated value on a separate line. I would group the aggregate calculation by one of the attributes. My proposed attribute table would look something like the following:
The aim would be to have a single label for the 3 features (these have the same coordinates) like below:
1
2sometext3sometext
6sometext9sometext
5sometext7sometext
(The concatenation will be grouped by Column A)
To achieve this I tried using the following expression for the label value:
"Column A" || '\n' || concatenate ( to_string("Column B") || 'some text' || to_string("Column C") || 'some text' || '\n' , " Column A")
The expression nearly worked but has given me a trailing blank line. Does anyone have any suggestions for getting rid of this blank line or can anyone offer a better expression to achieve my aims. Any additional advice on how to further sort this label by the numerical values in Column B would also be great.