# Add data tables

### Overview

This guide explains how to add data tables to dashboards, configure columns and rows, apply formatting and styling, set up linked cells that connect to other datablocks, and use Excel-like formulas for calculations. Tables are perfect for detailed metrics and cross-referencing data across your analytics.

### Step 1: Add a Data Table to the dashboard

You will have to specify the size (number of rows and columns) of your table.

<figure><img src="/files/dRhcBhySVmxoCi2hiqOn" alt=""><figcaption></figcaption></figure>

For demo purpose, we will create a 3 by 3 table. Then click "**Create Table**"

<figure><img src="/files/uD4f2RfQBz1d3VqjlAYl" alt=""><figcaption></figcaption></figure>

### Step 2: Start editing your table

This tables works just like most spreadsheet where you can type in values and apply basic formatting to numbers, currencies, text, etc.

<figure><img src="/files/5nRjlfadGoB61H4CqVC3" alt=""><figcaption></figcaption></figure>

### Step 3: Link a cell to a data source

A powerful feature of data table is to link it to multiple data source. Now, right click on the cell to see the option menu, then click "**Link to Datablock**" -> "**From Existing Datablock**"

<figure><img src="/files/v6zUjVzHoHJLIMVJPdki" alt=""><figcaption></figcaption></figure>

Then we can choose the metrics that we want to add to the table

<figure><img src="/files/aunFIuZcJGEBbLoct3He" alt=""><figcaption></figcaption></figure>

Reminder: choose the aggregation type (total or average) before creating the link. Click "Create" to confirm

<figure><img src="/files/vvL9CA20xOS4RzwaSg8v" alt=""><figcaption></figcaption></figure>

Once it is done, we will be able to see that the cell has been linked. From now on, the metric will be updated and refresehd together with other charts in the dashboard.

<figure><img src="/files/2HoBJHQrUWjMnw4uf5H4" alt=""><figcaption></figcaption></figure>

### Step 4: Link cell to custom block

Data table does not limit to pre-built metrics, but also let your link to a custom datablock. Simply choose "**Create Custom Block**" after you right click on the cell.

<figure><img src="/files/vgRpR0YWnCNNY3cmk1E3" alt=""><figcaption></figcaption></figure>

We encourage you to try it out!


---

# Agent Instructions: 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:

```
GET https://docs.smaq.io/documentation/features/dashboard/add-data-tables.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
