Combine Columns

Glue columns and your own text together into one value.

What it does

Combine Columns joins parts into a single piece of text. A part is a column, or text that you type. You set the order of the parts. The result goes into a new column or an existing one.

Build the value

  1. Type combine in the Search transforms box, in the Pipeline panel.
  2. Click Combine Columns. The panel opens below the grid.
  3. Click the box under Define values or columns to combine.
  4. Click a column in the dropdown to add it.
  5. Type your own text, then press Enter to add it.
  6. Repeat until the parts are in the order you want.
  7. Click Apply.

Press Backspace in the empty box to remove the last part. You can also click the x on any part.

Two kinds of part

  • Column parts are filled with colour and carry a type letter: T, # or D.
  • Text parts are plain and sit inside quote marks.
  • A space is a valid text part. Type one space and press Enter.
  • Type a full column name and press Enter. You get a column part, not a text part.

Shipping addresses show the idea. Add the city column first. Add a text part that holds a comma and a space. Add the state column last. The result reads Bengaluru, KA.

Choose where the result goes

The Apply results into control sits near the bottom of the panel.

  • Click New Column (Text) to create a column. Type a name in New Column Name.
  • A name that is already in use shows a warning under the box. Pick a free name.
  • Click Existing Column to write over a column you already have.
  • In that mode, open Select existing column... and pick the target. The dropdown lists every column.

Leave the name empty and the new column is called combined.

Combine only some rows

Click Add Condition to limit the step. The window opens on the Visual tab. Pick a column, pick a comparison, and type a value. Click Apply Condition.

  • With a new column, rows that do not match stay empty.
  • With an existing column, rows that do not match keep their old value.

Empty cells and number columns

An empty cell adds nothing to the result. It does not blank out the whole value. Numbers and dates are turned into text first, so any column type can join in.

For SQL users

Three parts, written into a new column, run as:

SELECT *, CONCAT(COALESCE(CAST("city" AS VARCHAR), ''), ', ', COALESCE(CAST("state" AS VARCHAR), '')) AS "delivery_label" FROM "addresses"
Try Combine Columns with sample data →

Related Operations