---
title: "Customizing Metric Unit"
description: "Customize metric units in Middleware dashboards to match your monitoring needs and display preferences."
section: "Dashboard Builder"
breadcrumb: "Dashboard Builder > Customizing Metric Unit"
canonical: "https://docs.middleware.io/features/dashboards/customizing-metric-unit"
---
# Customizing Metric Unit

Each metric value is associated with a unit that defines how the value should be interpreted—whether it's in seconds, bytes, percentages, CPU cores, or other measurements. Correctly assigning a unit ensures that your data is accurately visualized and easy to understand. The relevant unit appears on hover for charts such as Timeseries, Pie, or Tree, and is displayed directly within the value for charts like Table and Query Value.

![Customizing Metric Unit for Query Value](/images/platform/customizing_metric_unit_query_value.jpg)

![Customizing Metric Unit for Table Chart](/images/platform/customizing_metric_unit_table_chart.jpg)

![Customizing Metric Unit For Timeseries Chart](/images/platform/customizing_metric_unit_timeseries_chart.jpg)

**Examples:**

- `system.cpu.time`: Represents the total time the CPU spends on tasks, measured in seconds.
- `system.cpu.utilization`: Indicates the percentage of CPU used by all processes, measured in percent.

Many metrics have a default unit already configured. When visualized in charts or dashboards, the UI automatically uses this default to format and label the data appropriately. For instance, the `system.cpu.utilization` metric is rendered using a percent sign (%) to indicate percentage usage.

## Customizing the Unit

In some cases, you may want to override the default unit, especially if you know the data's context better or need to align it with a specific reporting format.

> **Note:** **Note:** The examples provided here showcase only a few widget types, but the unit can be customized to support any widget type.

To set a custom unit:

1. Click on "Show Advanced Options" in your query panel.
2. In the expanded section, locate the "Unit" field.
3. Select the appropriate unit from the dropdown.

![Customizing Metric Unit: Open Unit Dropdown](/images/platform/customizing_metric_unit_open_dropdown.jpg)

![Customizing Metric Unit: Tooltip Display](/images/platform/customizing_metric_unit_tooltip.jpg)

The metric values will now be interpreted and displayed using the selected unit.

## Auto Scaling

The system will automatically scale the value depending on its magnitude for better readability. For example, if the unit is **KB**,

The value is `32343454534`; it will display as `32.34 TB` instead of the large `32343454534 KB` value.

The value is `0.0035`, it will display as `3.5 B` instead of the small `0.0035 KB` value.

## Adding a Rate Unit

If your metric represents a **rate**, such as a value over time (e.g., requests per second), you can specify this as well:

1. Click the "+" icon next to the unit dropdown.

![Customizing Metric Unit: Unit Dropdown](/images/platform/customizing_metric_unit_dropdown.jpg)

2. A secondary dropdown will appear where you can choose a rate unit (e.g., **per second** (`/s`), **per dollar** (`/$`), etc.).

![Customizing Metric Unit: Rate Unit Selection](/images/platform/customizing_metric_unit_rate.jpg)

This ensures that rate-based metrics are accurately labeled and rendered, making your dashboards more informative and easier to interpret.

> **Note:** **Tip:** If you're unsure of the correct unit, simply leave the Default option selected. The system will apply the most suitable unit automatically based on the metric.

## Unit List

| **Type** | **Unit** |
| --- | --- |
| Bits | Bit / Byte / Kilobit (kb) / Megabit (mb) / Gigabit (gb) |
| Bytes (Binary) | Bit / Byte / Kibibyte (KiB) / Mebibyte (MiB) / Gibibyte (GiB) |
| Bytes (Decimal) | Bit / Byte / Kilobyte (KB) / Megabyte (MB) / Gigabyte (GB) |
| Cpu | nanocores (ncores) / microcores (μcores) / millicores (mcores) / cores / kilocores (Kcores) / megacores (Mcores) / gigacores (Gcores) |
| Time | Nanoseconds / Microseconds / Milliseconds / Seconds / Minutes / Hours / Days |
| Percentage | Percentage |
| Money | Dollars |
| Frequency | Hertz / Kilo Hertz / Mega Hertz / Giga Hertz |
| General | Date Format / Time Ago / Ago / Bytes Rate / Count / Age / Seconds / Percentage Rate / Percentage Without Bar / Badge / Text Style / Cost / Icon / OS Icon / Bit Rate / Time Utilization / Count Rate / Status / Rate / Nanosecond / Milliseconds |

### Examples

| **Unit** | **Family** | **Raw Value** | **Formatted** |
| --- | --- | --- | --- |
| Bit | Bits | 3 | 3 b |
| Byte | Bits | 500234.3454 | 500.23 kb |
| Kilobit | Bits | 0.5 | 500 B |
| Megabit | Bits | 5 | 5 mb |
| Gigabit | Bits | 50 | 50 gb |
| Bit | Bytes (Binary) | 10 | 1.2 B |
| Byte | Bytes (Binary) | 50 | 50 B |
| Kibibyte (KiB) | Bytes (Binary) | 23090 | 22.54 MiB |
| Mebibyte (MiB) | Bytes (Binary) | 0.2048 | 209.71 KiB |
| Gibibyte (GiB) | Bytes (Binary) | 40 | 40 GiB |
| Bit | Bytes (Decimal) | 5 | 5 b |
| Byte | Bytes (Decimal) | 0.2 | 1.6 b |
| Kilobyte (KB) | Bytes (Decimal) | 20 | 20 KB |
| Megabyte (MB) | Bytes (Decimal) | 1000 | 1 GB |
| Gigabyte (GB) | Bytes (Decimal) | 50000 | 50000 GB |
| Nanocores (ncores) | Cpu | 1 | 1 ncores |
| Microcores (μcores) | Cpu | 1000 | 1 mcores |
| Millicores (mcores) | Cpu | 0.5 | 500 μcores |
| Cores | Cpu | 10 | 10 cores |
| Kilocores (Kcores) | Cpu | 3000 | 3 Mcores |
| Megacores (Mcores) | Cpu | 0.6 | 600 Kcores |
| Gigacores (Gcores) | Cpu | 50 | 50 Gcores |
| Nanoseconds | Time | 1000000000 | 1 s |
| Microseconds | Time | 10 | 10 μs |
| Milliseconds | Time | 0.000001 | 1 ns |
| Seconds | Time | 60 | 1 min |
| Minutes | Time | 120 | 2 hr |
| Hours | Time | 0.5 | 30 min |
| Days | Time | 30 | 30 days |
| Percentage | Percentage | 50.23432 | 50.23 % |
| Dollars | Money | 100.23409234 | 100.23409 $ |
| Hertz | Frequency | 20 | 20 Hz |
| Kilo Hertz | Frequency | 1234 | 1.23 MHz |
| Mega Hertz | Frequency | 340 | 340 MHz |
| Giga Hertz | Frequency | 34 | 34 GHz |
| Date Format | General | 1751354083000 | 2025-07-01 12:44:43 |
| Time Ago | General | 1751354083000 | 10 minutes ago |
| Ago | General | 1719818109000 | 1 year ago |
| Bytes Rate | General | 100 | 100 B/s |
| Count | General | 3420 | 3.42 K |
| Age | General | 1719818109000 | 1 year ago |
| Seconds | General | 40 | 40 s |
| Percentage Rate | General | 50.23432 | 50.23 %/s |
| Cost | General | 50 | $ 50 |
| Bit Rate | General | 8 | 1 B/s |
| Time Utilization | General | 9360.244650086986 | 2 hrs 36 m 1 s |
| Count Rate | General | 3420 | 3.42 K/s |
| Rate | General | 3420 | 3.42 K |
| Nanosecond | General | 3000 | 0.003 s |
| Milliseconds | General | 3452 | 3.45 s |
