> For the complete documentation index, see [llms.txt](https://docs.mashmatrix.com/mashmatrix-sheet/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.mashmatrix.com/mashmatrix-sheet/functions_advanced/time_series_matrix_transformation/add_child_column.md).

# Add Child Column

To add a child column to display inside a matrix column, select Add Column from the menu in the series value header or the menu in the child column header. There are two types of columns that can be added as child columns:

* **Field Column**
* **Formula Column**

{% hint style="warning" %}
You cannot add a data column as a child column of matrix column. Also, you cannot add fields through polymorphic relation.
{% endhint %}

## Add Field Column <a href="#add-field-column" id="add-field-column"></a>

The fields that can be selected as child columns are the fields of the related list object that you specified when creating the matrix columns. Select fields you wish to display as child columns from the list of fields displayed in the Field Column tab.

![](/files/FPfBGrOZYJi3hcmwveS5)

## Add Formula Column

Like normal columns, formula columns can be added to the child columns. From the Formula Column tab, you can launch the formula editor and write formulas, just as you would in a regular formula column.

![](/files/zeASCdVIZcj9l953Xm5N)

As with regular sheet formulas, you can reference columns from the same or other sheets as variables, and you can use global variables and functions in formulas, but you cannot reference Salesforce fields directly as field variables. To reference a Salesforce field value, it must be added to the matrix column as a child column and then referenced as a column variable.

When referring from a formula inside a matrix column to a child column in the same matrix column as a variable, you can refer to one that is in the same series value as the cell being evaluated, or one that is in the series value before/after the specified number of steps. For more information on formulas inside matrix columns, see "[Matrix Column and Formula](/mashmatrix-sheet/functions_advanced/time_series_matrix_transformation/matrix_column_and_formula.md)".


---

# 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 dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.mashmatrix.com/mashmatrix-sheet/functions_advanced/time_series_matrix_transformation/add_child_column.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
