> For the complete documentation index, see [llms.txt](https://docs.powertable.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.powertable.com/explore-powertable/working-with-powertable/column-setup/add-visual-column/reference-column.md).

# Reference Column

Adding a reference column involves connecting one table to another based on matching columns, enabling you to reference the required columnar data from the connected tables for each record.

When you have multiple tables with a few shared columns, you can easily add reference columns to refer to data from the connected tables.

#### To add a reference column:

1. Go to **Setup > Columns.**

<figure><img src="https://1781349671-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKyXRCFh0c08ryiUFvyMV%2Fuploads%2FA6YxIAqb1N2YBAztLXWr%2Fimage.png?alt=media&amp;token=1f4af3ea-7fde-4d41-9fe2-c8d6c992491e" alt=""><figcaption><p>Setup > Columns</p></figcaption></figure>

2. Click **Add Visual Column > Add Reference Column.**

<figure><img src="https://1781349671-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKyXRCFh0c08ryiUFvyMV%2Fuploads%2F8bgoAESafve284VenqoD%2Fimage.png?alt=media&amp;token=f1a355c3-fb4e-4043-9827-3b5d1a38e8d4" alt=""><figcaption><p>Add Reference Column</p></figcaption></figure>

Alternatively, you can insert a new column from the 'Home' tab, as shown below:

<figure><img src="https://1781349671-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKyXRCFh0c08ryiUFvyMV%2Fuploads%2Fu6RwTHCtxShEIv1TKPOl%2Fimage.png?alt=media&amp;token=649babfe-2440-4ae7-8b32-d2e75be5a9fc" alt=""><figcaption></figcaption></figure>

3. Enter the name of your visual column. We want to include the order date, so we enter the name 'Order Date'. We can also change the type to 'Date'.

<figure><img src="https://1781349671-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKyXRCFh0c08ryiUFvyMV%2Fuploads%2F8jeLoMSo7NGiJM4PYiXC%2Fimage.png?alt=media&amp;token=d2332cf4-4a74-4982-ac4a-7e6d1402fd2d" alt=""><figcaption><p>Type and Column Name</p></figcaption></figure>

4. Let us now enter the column and table details that we want to refer to. Enter the connection details, schema name, reference table name, column to be referenced, and the column that corresponds to both current and reference tables. Click **Save.**

In the example below, we have referred to the 'Orderdate' column from the 'Sales' table, whose connection details we have entered.

<figure><img src="https://1781349671-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKyXRCFh0c08ryiUFvyMV%2Fuploads%2FOw70qZQlLwrPm2ClJcFd%2Fimage.png?alt=media&amp;token=0b7677b5-de4b-4739-bf3d-52647b53e82b" alt=""><figcaption><p>Table details</p></figcaption></figure>

The visual column is added to the table, and it looks as shown below:

<figure><img src="https://1781349671-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FKyXRCFh0c08ryiUFvyMV%2Fuploads%2FmheZKP7fn6Xg0tG2fly2%2Fimage.png?alt=media&amp;token=e32baf0a-3d2c-416c-9763-d2e88e03883b" alt=""><figcaption><p>Reference column added</p></figcaption></figure>

Reference columns are non-editable, and their values only change when the underlying column values change.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.powertable.com/explore-powertable/working-with-powertable/column-setup/add-visual-column/reference-column.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
