Skip to main content

Axi writes measures and metrics, and compiles them first

Axi could describe your tables and declare their keys. It can now write the two things you actually build dashboards on — measures with their business rule baked in, and metrics — and it checks a metric against the engine before offering it to you.

The rule belongs on the measure​

"Revenue should only count paid orders." Axi puts the condition on the measure itself, so every chart, widget and answer built on it agrees and nobody has to remember to add a filter. It can also pin a measure to a date other than the table's main one — ship date rather than order date — and mark the ones that must never be summed across time, like a balance or a stock level: the last value of each period instead, per account if you say so.

Metrics, compiled before they are proposed​

Say what a number should mean — "a conversion rate: purchases over visits", "revenue month to date", "margin as (revenue − cost) / revenue", "revenue against the same month last year" — and Axi writes the definition.

Before it reaches your draft it is run through the same check the Metrics page shows you: does it plan, which tables can it then be grouped by, along which date. A metric that does not compile never lands; it comes back on the card as a skipped row saying why, so you find out in the chat rather than on a dashboard.

Axi also files it where it belongs. A metric is stored on the table owning its measure, whatever table you had open, and the card names the one to save.

And when you ask for both at once, the measure is written first — a metric can only read a measure that exists.

Two more things the model needed​

Axi can now set the periods a date can be grouped by, and tag a column as geography so it can be drawn on a map — after reading the column's real values, because the identifier has to match what is actually there.

On the Metrics page​

Open Axi with a metric on screen whose check is failing and the first thing it offers is Explain why the check fails, with the reason underneath. When every metric compiles, it offers instead to turn the measures nothing reads yet into metrics.

📖 Modelling with Axi · Metrics · Dimensions and measures