# Using Statistics

A **Statistic** is a special block type that allows you to retrieve and prominently display key values from your Dataframes. This feature is useful for tracking metrics such as sales totals, user counts, or performance indicators.

### Adding a Statistic

To add a statistic block:

1. Press **`/`** to open the menu.
2. Select **Statistic** from the available options.
3. Click the **Settings** icon to begin configuring your statistic.

### Configuring a Statistic

You can input either a **static value** or a **dynamic value**:

* **Static Value:** Enter a fixed number that does not change.
* **Dynamic Value:** Retrieved from a Dataframe and updates automatically when the Dataframe is re-run.

#### Retrieving a Dynamic Value

There are two ways to extract a value from a Dataframe:

1. **Selecting a Specific Cell**
   * Choose a column and row to retrieve a precise value.
   * Useful for sorted data where a specific ranked value is needed.
2. **Generating an Aggregate**
   * Perform calculations on a column, such as:
     * **Sum** (e.g., total sales for a month)
     * **Average**
     * **Count**
     * **Other aggregations based on the dataset**

#### Additional Configuration Options

* **Title:** Add a descriptive title for context.
* **Prefix:** Specify a unit or currency symbol (e.g., "$", "€", "Units").
* **Number Formatting:**
  * Shorten large numbers and make them easier to read using suffixes:
    * **K** (thousands)
    * **M** (millions)
    * **B** (billions)

#### Adding a Comparison Value

You can add a **comparison value** to the same statistic card. This comparison value has the same retrieval options as the primary value. Additionally, Airbook will automatically generate a **percentage indicator** to show how much the primary value is over or below the comparison value.


---

# 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.airbook.io/explore/using-statistics.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.
