When you create or edit a metric in Whatagraph, you need to decide how the value should look and how it should be calculated. This article explains value types, aggregation options, and calculation levels so your metrics make sense and stay accurate.
Go to metrics under the Organize section on the left panel, create or open the custom metric you want to edit, and click Edit metric.
Choose the right Value Type
The Value type controls how the number is displayed in the widget.
Open the Value type dropdown and select the option that best matches your data:
Number: Use for whole numbers, such as message counts.
Decimal number: Use when decimals are important, such as averages.
% Percentage (x100): Converts decimal values into percentages.
Currency: Adds a currency symbol to the value.
Seconds: Displays time values in seconds.
Milliseconds: Displays time values in milliseconds.
Select an Aggregation method
Aggregation defines how multiple data points are combined into a single result.
In the Aggregation dropdown, choose one of the following:
Sum: Adds all values together.
Average: Calculates the average of all values.
First: Uses the first value in the selected date range.
Last: Uses the last value in the selected date range.
Note: First and Last are always based on the selected date range, not on the order of rows in a table.
Choose an Aggregation Type
The Aggregation type determines when the formula is applied.
Open the Aggregation type setting and choose one of the following options.
Row level
With Row level, the formula is calculated on each row first.
After that, the results are combined using Sum or Average.
This means:
Each row gets its own calculated value.
The final number is the total or average of those values.
Row level is useful when every row represents a meaningful individual result.
Aggregate level
With the Aggregate level, the rows are aggregated first.
The formula is then calculated on the aggregated values.
This means:
Data is summed or averaged first.
The formula is applied only once, on the total.
Aggregate level is useful for metrics that only make sense at a total level.
Set the Increase
The Increase setting defines whether higher or lower values are considered better.
In the Increase field, choose:
Positive if an increase in value is better.
Negative if a decrease in value is better.
Important Things to Note:
Single value widgets using direct sources return one value only
When you request a single value, the API returns one value for the entire date range, not per row.Row level and Aggregate level cannot be mixed
You cannot create a Row level metric on top of an Aggregate level custom metric.First and Last depend on time, not rows
These options always use the first or last value in the selected date range.Different aggregation types can change results significantly
Always double-check whether Row level or Aggregate level matches what you want to measure.





