# Statistic Charts

Statistic charts present a single, prominent number that summarizes a key aspect of your dataset. They offer a quick and clear insight into a specific metric or value, making them perfect for dashboards and key performance indicators (KPIs).

## When to use Statistic Charts

Statistic charts are ideal when you want to:

* Display a single key metric prominently
* Show KPIs at a glance
* Create a dashboard of important numbers
* Provide quick insights without detailed breakdowns

## Configuring Your Statistic Chart

Statistic charts are the simplest charts to configure—they display a single calculated value.

### Setting the Value

You configure what number to display and how to calculate it:

1. **Value Field**: The numeric field to measure (or record count)
2. **Aggregation Method**:
   * **Count**: Total number of records
   * **Sum**: Total of a numeric field
   * **Average**: Mean value of a field
   * **Min**: Lowest value in the field
   * **Max**: Highest value in the field
3. **Label**: The title/description of what this statistic represents

### Example Configurations

**Scenario 1**: Show total number of customers

**Value Configuration:**

* Aggregation: `Count` (count all customer records)
* Label: "Total Customers"

**Scenario 2**: Show total revenue

**Value Configuration:**

* Field: `Revenue`
* Aggregation: `Sum`
* Label: "Total Revenue"

**Scenario 3**: Show average deal size

**Value Configuration:**

* Field: `Deal Value`
* Aggregation: `Average`
* Label: "Average Deal Size"

## Adding Context and Formatting

Statistic charts often include additional elements:

* **Title**: Clear description of the metric
* **Subtitle**: Additional context (e.g., "Last 30 days", "This quarter")
* **Prefix/Suffix**: Currency symbols ($), units (hours, kg), or percentages (%)
* **Number formatting**: Thousands separators, decimal places

**Example:**

* Value: 1,234,567
* Prefix: "$"
* Formatted Display: "$1,234,567"
* Label: "Total Revenue"
* Subtitle: "This Quarter"

## Common Use Cases

### Business KPIs

* **Total Revenue**: Sum of all sales
* **Customer Count**: Count of customer records
* **Average Order Value**: Average of order amounts
* **Conversion Rate**: (Won Deals ÷ Total Leads) × 100

### Operational Metrics

* **Open Tickets**: Count where Status = "Open"
* **Average Response Time**: Average of response time field
* **Pending Orders**: Count where Status = "Pending"
* **Completion Rate**: Percentage of completed tasks

### Financial Metrics

* **Total Budget**: Sum of budget allocations
* **Remaining Budget**: Sum of (Budget - Spent)
* **Largest Deal**: Max of deal value field
* **Average Project Cost**: Average of project costs

### User Metrics

* **Active Users**: Count where Active = true
* **New Signups Today**: Count where Created Date = Today
* **Average Session Duration**: Average of session time field

## Using Filters with Statistics

Apply view filters to make statistics more meaningful:

**Example**: Show statistics for a specific time period

* Add filter: `Created Date is after [Start of Month]`
* The statistic will only count/sum records from this month

**Example**: Show statistics for a specific category

* Add filter: `Status equals "Active"`
* The statistic will only include active records

**Example**: Show statistics for the logged-in user

* Add filter: `Owner is [Logged in User]`
* Each user sees their own metric

## Creating a KPI Dashboard

Combine multiple statistic charts on a blank page:

1. Create a blank page
2. Add multiple chart widgets
3. Configure each as a statistic chart showing different metrics
4. Arrange them in a grid for an at-a-glance dashboard

**Example Dashboard:**

* Total Customers | New This Month | Active Subscriptions
* Total Revenue | Average Order | Largest Deal
* Open Tickets | Avg Response Time | Satisfaction Score

## Tips for Better Statistic Charts

1. **Choose meaningful metrics**: Display numbers that drive decisions
2. **Add context**: Use subtitles to indicate time periods or filters
3. **Format appropriately**: Add currency symbols, units, and proper decimal places
4. **Group related metrics**: Place related statistics near each other on dashboards
5. **Use filters**: Make statistics specific to relevant time periods or categories
6. **Keep labels clear**: Use concise, descriptive labels that explain the metric
7. **Consider comparisons**: Place related statistics side-by-side (e.g., "This Month" and "Last Month")

## Advanced: Calculated Statistics

For more complex metrics, you might need to:

1. **Create formula fields** in your data source to calculate custom metrics
2. **Use rollup fields** to aggregate related data
3. **Apply multiple filters** to define complex criteria

**Example**: Calculate conversion rate

* Create a formula field: `(Won Deals / Total Leads) * 100`
* Display as a statistic chart with "%" suffix

## Combining Statistics with Other Charts

Statistics work best alongside detailed charts:

* **Statistic** shows the total revenue
* **Line chart** shows revenue trend over time
* **Bar chart** shows revenue by category

This combination gives both quick insights (statistic) and detailed context (other charts).

## Common Questions

**Q: Can I show multiple statistics on one chart?** No, each statistic chart shows one value. Add multiple chart widgets to display several statistics.

**Q: How do I compare this month to last month?** Create two separate statistic charts with different date filters, and place them side-by-side.

**Q: Can I show a percentage?** Yes, either calculate the percentage in a formula field, or add a "%" suffix to the display.

**Q: How do I make a statistic show only my data?** Add a filter using "Logged in User" to filter records to those relevant to each user.

**Q: Can statistics auto-refresh?** Statistics update when the page loads. In published apps, they refresh based on your data source sync settings.
