4

I need to combine the content of multiple cells into one, this is based on a common "ID". I need this "ID" to remain after the text has been merged. I tried the aggregate tool but I can't get it to leave the "ID" field.

See the screenshot below:

Example

6
  • Is this a feature class or standalone table?
    – sushi
    Commented Nov 18, 2022 at 19:14
  • It is a standalone table. It will be joined to a larger shapefile later.
    – Lukazio
    Commented Nov 18, 2022 at 20:32
  • @Aaron the answer you linked does not anser the OP's question here, it's a different question
    – Babel
    Commented Nov 18, 2022 at 22:18
  • 1
    Question was closed, no answer possible. Use this expression: concatenate( "long_legal_text", group_by:="line_id", concatenator:=',' )
    – Babel
    Commented Nov 18, 2022 at 22:21
  • @Lukazio My apologies for closing this earlier--it is clearly different than the one I linked to.
    – Aaron
    Commented Nov 19, 2022 at 3:05

1 Answer 1

6

Use this expression:

concatenate(    
    "long_legal_text",      
    group_by:="line_id",    
    concatenator:=','  -- replace comma by any other delimiting character
)

enter image description here

Not the answer you're looking for? Browse other questions tagged or ask your own question.