NewMaxio Metering is now available — usage-based billing for Advanced Billing.Learn more
/

Use Advanced Formulas with Metered Fields

··

Last updated on Aug 28, 2026

BETA

This feature is currently in beta and may change over time. During the beta period, functionality, availability, and performance may vary.

To join the Beta program, request Beta access.

Combine multiple Meters into a single calculated value on a Metered Field, so customers see one meaningful number instead of several raw meter readings they'd have to add up themselves. Use a formula to simplify what appears on the invoice, apply thresholds, or calculate a derived metric like a ratio or net usage that no single Meter provides on its own.

By default, a Metered Field displays the raw aggregated value for each Meter you select. For example, instead of showing reads and writes as two separate rows, you could display a single Total I/O Metered Field driven by the formula [reads] + [writes].

Important: Advanced Formulas in Metered Fields require the meter_formula feature to be enabled on your site, in addition to Metered Fields. Contact Maxio Support to request access.

Enable a formula on a Metered Field

  1. When creating or editing a Metered Field, click Switch Formula.

    Formula editor for a metered field

  2. Click Select Meters to choose the member Meters to include in your formula. All Meters must belong to the same Stream.

  3. Enter a formula expression using [meter-handle] bracket notation, for example [reads] + [writes] or MAX([revenue] - [cost], 0).

  4. Click Validate to confirm the formula syntax and Meter references before saving.

    Validation result confirming the formula is valid

  5. Click Save.

Supported formula syntax

ElementSyntaxExample
Meter reference[meter-handle][api-calls], [storage-gb]
Addition+[reads] + [writes]
Subtraction-[revenue] - [cost]
Multiplication*[calls] * 0.01
Division/[total] / [count]
Less than<[usage] < 1000
Greater than>[usage] > 1000
Absolute valueABS(expr)ABS([inbound] - [outbound])
MinimumMIN(a, b)MIN([usage], 1000)
MaximumMAX(a, b)MAX([usage] - [included], 0)
RoundROUND(expr, places)ROUND([revenue] / [count], 2)
ConditionalIF(condition, value_if_true, value_if_false)IF([usage] < 5000, 0, [usage])

To understand Metered Fields before configuring a formula, see Understand Metered Fields for Invoices.

To create and activate a Metered Field, see Create Metered Fields for Invoices.

For formula syntax used directly on a Meter (not within a Metered Field), see Use Advanced Formulas Between Meters.

Still need help?
Reach out and our support team will take it from here.

Contact support