> AI agents: this is one page from Mammoth Analytics documentation. The index of all pages as Markdown is https://mammoth.io/docs/llms.txt. Append `.md` to any docs URL, or send `Accept: text/markdown`, to get Markdown.

# Look up a value from another dataset (like VLOOKUP) in Mammoth

> Use Lookup in Mammoth to fetch one value from another View by a matching key, like VLOOKUP in Excel. Every row stays and no rows are added.
>
> Applies to: All plans. Roles: Project Editor or Project Admin. Where: View › Describe your transformation › Unify › Lookup

**Lookup** fetches one value from another View (the foreign View) by matching a key, and writes it to a column, like VLOOKUP in Excel. Every row in your View stays and no rows are added. Open it from **Describe your transformation**, then **Unify** › **Lookup**.

## Join or Lookup?

| | Join | Lookup |
| --- | --- | --- |
| Brings in | Any number of columns | One value column |
| Rows with no match | Depends on the join type | Always kept, with a blank value |
| Repeated keys in the other View | Can multiply rows | Never add rows: one match is used |

Need several columns, or control over which rows stay? Use [Join](https://mammoth.io/docs/learn/clean-and-shape/join/).

## Look up a value in six steps

1. Click **Describe your transformation**, then **Unify** › **Lookup**. In the **Select View** window that opens, choose the dataset, then the View to look up from, and click **Select "<dataset> / <View>"**. Both Views appear side by side in **Preview** › **Views**.
2. In **Current view key column**, pick the key in your View.
3. In **Foreign view key column**, pick the matching key in the other View. It lists only columns of the same type as your key.
4. In **Foreign view value column**, pick the column to fetch. Each column shows a type icon (**Aa** for text, **123** for numbers).
5. Set the output. Click **new** to choose:
   - **New Column**: type a name. The column takes the value column's type, shown in the label, for example **Place in new text column**.
   - **Existing Column**: pick a column in your View to overwrite.
6. Click **Apply**. The task card lists the keys, value column and output column.

![Lookup panel with current view key column brand, foreign view key column city, value column country, and a Place in new text column field named Country_Import](https://mammoth.io/docs/images/20261009_120400_Lookup-Panel.webp)

## Missing and repeated keys

- A row with no match gets a blank value.
- If the foreign key repeats, Lookup takes the first matching row in the other View. **Preview** › **Matches** counts the keys with more than one value. To pick which row wins, run **Remove Duplicate Rows** on the other View first, or use Join.
- If a saved Lookup's key columns change type later, Lookup shows the same key warnings as Join. An ID against a non-ID, or different currencies, can show at any time. Warnings never block **Apply**.

## Example: add student names to marks

`Mark Sheet` has `Student ID` and `Total Marks`. `Students` has `ID` and `Name`. Look up with `Student ID` as the current key, `ID` as the foreign key and `Name` as the value, into a new column `Name`:

| Student ID | Total Marks | Name |
| --- | --- | --- |
| 2 | 239 | Bob |
| 1 | 232 | Alice |
| 4 | 200 | Diana |

Student 3 (Chuck) has no marks, so no row is added for him.

![Pipeline with a Lookup task, and the data grid showing the new City_Import column](https://mammoth.io/docs/images/20260417_130258__Lookupapplied_1.webp)

## Related

- [Join two datasets on a shared column](https://mammoth.io/docs/learn/clean-and-shape/join/): bring in several columns.
- [Remove duplicates and check data](https://mammoth.io/docs/learn/clean-and-shape/duplicates-and-checks/): make foreign keys unique.
- [Convert text to dates and numbers](https://mammoth.io/docs/learn/clean-and-shape/convert-column-type/): fix a key type mismatch.

---
Source: https://mammoth.io/docs/learn/clean-and-shape/lookup.md · Updated: 2026-11-08
