> ## Documentation Index
> Fetch the complete documentation index at: https://docs.databar.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Merge columns

> Combine multiple columns into one using smart fallback logic.

Merge Columns lets you combine multiple columns into a single output column using priority-based fallback logic. Databar picks the first non-empty value from your ordered list of source columns, giving you a clean, consolidated result.

<Frame>
  <video muted loop playsInline controls preload="metadata">
    <source src="https://mintcdn.com/databar/1HxDp-5Nh4jyfYYu/images/product-guide/merge-columns.mp4?fit=max&auto=format&n=1HxDp-5Nh4jyfYYu&q=85&s=64b695fcb6ca341af2a7038183495953" type="video/mp4" data-path="images/product-guide/merge-columns.mp4" />
  </video>
</Frame>

<Info>
  Merge Columns is a **transformation**. It does **not** consume any credits.
</Info>

## When to use

When the same data point exists across multiple columns (often because you enriched from different providers), you end up with fragmented values. For example, you might have a company name from Apollo, another from Clearbit, and a third from your CRM import. Merge Columns resolves this into one authoritative column.

## How to use

<Steps>
  <Step title="Add a Merge Columns transformation">
    Open your table, add a new transformation column, and select **Merge Columns**.
  </Step>

  <Step title="Select columns in priority order">
    Choose the columns you want to merge. The order matters. Databar will use the first non-empty value it finds, working from top to bottom.
  </Step>

  <Step title="View the result">
    A new column appears with the best available value for each row.
  </Step>
</Steps>

## Example

Suppose you have three columns for company website:

| Website (Apollo) | Website (Clearbit) | Website (Import) |
| ---------------- | ------------------ | ---------------- |
| -                | acme.com           | acme.io          |
| globex.com       | -                  | globex.net       |

With Merge Columns set to priority order Apollo → Clearbit → Import, the result column would contain:

| Merged Website |
| -------------- |
| acme.com       |
| globex.com     |

The first non-empty value wins.

## Related

<CardGroup cols={2}>
  <Card title="Tables overview" href="/product-guide/tables-overview">
    Learn how tables work in Databar.
  </Card>

  <Card title="Excel formulas" href="/product-guide/formulas">
    Use formulas for more complex merging logic.
  </Card>
</CardGroup>
