Trend plot with percent

Hi,

I'm creating a trend chart to display the evolution of a percentage over time.

The data is correct, but the trend indicator calculates the relative percentage change instead of the difference in percentage points.

For example, when the value increases from 2.0% to 16.1%, the indicator shows a 719.07% increase, whereas I would like it to show +14.1 percentage points.

Is there a way to configure the trend indicator to display the difference in percentage points rather than the relative percentage change?

Thanks!

Hi there,

The Trend chart only shows the change as a relative %, but you can show the change in percentage points using Metabase's Offset function, which reads a value from the previous row (here, last month's rate):

For the same example, the rate fell from 12.71% to 10.17%, which the Trend chart shows as -19.97%:

For the workaround, please do the following (tested on v0.65.3.6 with the Sample Database): Screenshot of the steps in the editor

  1. Summarize: add a custom expression for your percentage metric, e.g. "Discount rate": CountIf([Discount] > 0) / Count() * 100
  2. In the same Summarize step, add a second custom expression, "Previous rate": Offset(CountIf([Discount] > 0) / Count() * 100, -1)
    This returns the previous row's value, so the previous month's rate.
  3. Group by Created At: Month.
  4. Add a Custom column after the summary, "Change (pp)": [Discount rate] - [Previous rate]
  5. Sort by Created At: Month descending so the latest month is the first row.
  6. Visualize as Number, pick the Change (pp) column, and add " pp" as a suffix in the column formatting.

Note: Offset only works in the Summarize step and isn't available for MySQL/MariaDB, MongoDB or Druid.

Docs: Offset | Metabase Documentation

Let me know if you have any questions

Best,
Deekshith

Just to set expectations: this workaround won't make the Trend visualization’s own indicator show percentage points; it replaces that indicator with a Number card. If you want the trend line too, keep the line chart and add a separate Number card using the Change (pp) calculation, or expose that column in the tooltip. Worth watching missing months: when Offset has no previous row, the pp change will likely be blank rather than zero.

thanks to both for answering