# KPI Tile: Sparkline

A **KPI Sparkline Tile** combines a **KPI Tile** with a **Sparkline visualization** in a single view. This chart type allows users to see both the **current KPI value** and its **trend over time** in a compact format. It is designed to provide at-a-glance insights into **performance metrics** while also showing the **historical trend**.

The Sparkline Tile supports **one Dimension** (for time or category) and **one Measure**. If a second dimension is added, it is automatically converted to a measure. Additional values (third field) are **not supported**.

### When to Use a KPI Sparkline

Use a **KPI Sparkline Tile** when you want to:

* Track a **single KPI** with its **trend history** in a single visualization.
* Provide a compact **trend-over-time view** for dashboards.
* Replace separate KPI and line chart tiles with a unified component.
* Highlight **progress, seasonality, or fluctuations** alongside the latest value.

**Examples:**

* Monthly revenue value with historical revenue trend.
* Active user count with the last 12 months’ Sparkline trend.
* This indicates the current period's conversion rate and its directional trend.

### Chart Properties

#### General Settings

* **Label** – Text label for the KPI (e.g., *Monthly Revenue*).
* **Label Color** – Choose label font color.
* **Label Font Size** – Set font size for the label.
* **Exclude Global Filter** – Exclude this tile from global filters applied at the report level.

#### View Filter

* **Filter** – Select a condition to restrict displayed data (e.g., by region, timeframe).

#### Chart Properties (Sparkline)

* **Line Color** – Select the color of the Sparkline line.
* **Fill Color** – Select the background/area fill color under the Sparkline line.

#### Value Properties

* **Format Type** – Define numeric display format: None, Auto, Percent, Thousand, Lacs, Crore, Million, Billion, Trillion, Quadrillion.
* **Currency Type** – Add a currency symbol: None, Rupees, Euro, Pound, USD, Yen, Cent.
* **Precision** – Set decimal precision (up to 5 places).
* **Value** – Choose how the value is displayed:
  * **Aggregated** – Aggregate measure value (e.g., sum, avg).
  * **Last** – Display the last value in the Sparkline series (e.g., last month’s figure).

### Best Practices

* Use **Aggregated** when the KPI is cumulative (e.g., total revenue).
* Use **Last** when the KPI represents the most recent status (e.g., last week’s active users).
* Keep Sparkline colors consistent across dashboards for the same KPI type.
* Place Sparkline Tiles together for quick side-by-side comparison of KPIs and trends.


---

# 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.bdb.ai/bdb-user-documentation/platform-modules/10.0/bdb-visualization/self-service-reports/chart-gallery/kpi-tile-sparkline.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.
