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

# Stack

> Merge datasets vertically

The Stack tool takes two datasets and stacks them on top of each other vertically. It stacks columns with the same name on top of each other. If some columns (e.g. *revenue* and *amount* below) are only present in one of the datasets, the columns will still be stacked but the row values will be *NULL* in the rows from the other dataset where the column is not present.

<img className="rounded-md" src="https://mintcdn.com/less-51/am-71qiho-NViN_t/images/tools/stack/Stack.png?fit=max&auto=format&n=am-71qiho-NViN_t&q=85&s=ccb727e573385573373396904edf85a2" width="1098" height="582" data-path="images/tools/stack/Stack.png" />

<Warning>
  Columns with the same name that should be stacked must have the same data type
</Warning>

You can add as many incoming datasets as you want.

<img className="rounded-md" src="https://mintcdn.com/less-51/tvKC10PJfN6EkkU2/images/tools/stack/Stack_Multiple.gif?s=e7d5ef137d65a7ac0c8239dad1bc578d" width="2000" height="1254" data-path="images/tools/stack/Stack_Multiple.gif" />

### Configuration

You have two optional configuration steps:

<Steps>
  <Step title="Dataset column matching">
    By enabling this option you place a restriction that all tables that are stacked must have exactly the same columns. If one of the tables doesn't, then the Stack tool will fail. This is helpful if you know that all tables should match 1:1 in their structure.
  </Step>

  <Step title="Dataset order">
    You can choose to customize the order in which the datasets are stacked.
  </Step>
</Steps>
