# KPI Comparative Tile

A **KPI Comparative Tile** is a specialized visualization designed to display **two key performance indicators (KPIs) side by side** for direct comparison. It extends the functionality of a simple KPI Tile by adding **secondary value support, trend analysis, and conditional rules**. This makes it ideal for identifying **patterns, variations, and directional changes** between two related measures.

Unlike standard KPIs, the **Comparative Tile** highlights **how one measure performs in relation to another, providing users with** immediate insights into **gaps, growth, or decline**.

### When to Use a KPI Comparative Tile

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

* Compare **two related KPIs** (e.g., *Target vs. Actual*, *This Month vs. Last Month*).
* Show **performance trends** over time or across categories.
* Flag **improvement opportunities** through conditional rules (e.g., *if Actual < Target, highlight red*).
* This helps executives quickly spot variances without needing to dig into detailed charts.

**Examples:**

* Actual revenue vs. planned revenue.
* Current quarter’s churn rate vs. the previous quarter.
* Sales target achievement percentage with directional trends.

### Chart Properties

#### General Settings

* **Exclude Global Filter** – Exclude the chart from global filters applied at the report level.

#### View Filter

* **Filter** – Apply conditions to restrict the dataset shown in the KPI (e.g., filter by region or product line).

#### Label

* **Label** – Text describing the KPI (e.g., *Revenue vs. Target*).
* **Label Font Size** – Choose label font size.
* **Label Color** – Define label color.

#### Primary Value Properties

* **Font Size** – Set the size of the primary KPI value.
* **Format Type** – None, Auto, Percent, Thousand, Lacs, Crore, Million, Billion, Trillion, Quadrillion.
* **Currency Type** – None, Rupees, Euro, Pound, USD, Yen, Cent.
* **Precision** – Up to 5 decimal places.

#### Secondary Value Properties

* **Secondary Value** – Select the measure to compare against the primary value.
* **Font Size** – Set the font size of the secondary value.
* **Format Type** – Same as primary value.
* **Currency Type** – Same as primary value.
* **Precision** – Up to 5 decimal places.

#### Trend

* **Show Trend** – Enable to display trend direction (upward or downward) based on rules.
* **Trend Color** – Choose a color for the trend arrow/icon.

#### Rules

Rules define **comparisons and formatting** between the primary and secondary KPIs.

* **Primary Operator** – Select operator for primary value (e.g., ≥, ≤).
* **Operation** – Choose the operation type for applying the condition.
* **Secondary Operator** – Operator for secondary value.
* **Primary Color** – Assign color for the primary value if the condition is met.
* **Secondary Color** – Assign color for the secondary value.
* **Trend Direction** – Define direction (Upward, Downward).
* **Trend Color** – Choose trend icon color.

**Options:**

* **ADD** – Add new rule.
* **REMOVE** – Delete an existing rule.

{% hint style="info" %}
**Note:** You can set multiple rules. For example:

* If Primary ≥ Secondary → **Trend = Upward**, **Green**.
* If Primary < Secondary → **Trend = Downward**, **Red**.
  {% endhint %}

### Best Practices

* Use **simple, meaningful labels** (e.g., *Revenue vs. Target*).
* Apply **currency and precision formatting** to align with business context.
* Use **rules** sparingly—focus on highlighting critical conditions (e.g., below target).
* Choose **trend arrows and colors** that align with business meaning (e.g., upward/green = good, downward/red = bad).
* Keep comparative tiles consistent in layout across dashboards.


---

# 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-comparative-tile.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.
