Custom KPIs — your own metrics with SQL

Define your own metrics right in the codebook: NPS, top-box indices and derived scores via SQL — with CASE WHEN, SUM and ROUND. Computed at the data level and consistent across every wave, with no detour through SPSS.

Table with custom KPIs in DataLion’s codebook

DataLion computes your own KPIs right in the codebook: NPS, top-box indices and derived scores are built as computed columns via SQL — with CASE WHEN, SUM, ROUND, AVG and COUNT DISTINCT. They are computed at the data level, recalculated on every data update and applied consistently across every wave — with no export to SPSS.

  • 🇩🇪 Made in Munich
  • GDPR-compliant
  • DPA included
  • Hosted in Germany

Trusted by research, insights & media teams

  • YouGov
  • SevenOne Media
  • Mediengruppe RTL Deutschland
  • Nielsen Sports
  • mobile.de
  • 50+ interactive chart types
  • 20+ statistical methods (R)
  • 2 weeks release cadence
  • ISO 27001 certified data centers (Germany)

Define NPS, indices and scores yourself

Set your own metrics instead of rebuilding them in Excel: in DataLion you define NPS, top-box indices, sum scores, ratios and derived scores as computed columns — right in the codebook.

You build NPS, for example, with CASE WHEN nps >= 9 THEN 1 WHEN nps <= 6 THEN -1 ELSE 0 END — promoters minus detractors, as its own metric instead of by hand.

  • NPS, top-box indices and sum scores
  • Ratios and derived scores
  • As computed columns right in the codebook
Computed NPS score as a metric in DataLion

Computed via SQL expression

Your KPIs are built as SQL expressions — with functions like SUM, ROUND, AVG and COUNT DISTINCT plus conditional logic via CASE WHEN. That lets you build composite metrics too, say ROUND(SUM(top2) / COUNT(*) * 100, 1) for a top-2 index in percent.

Custom KPIs are SQL-based columns on your data — not a statistical model. For methods like regression or driver analysis, DataLion has its own analysis building blocks.

  • Functions SUM, ROUND, AVG, COUNT DISTINCT
  • Conditional logic via CASE WHEN
  • Composite indices and ratios in a single expression

At the data level, consistent across every wave

Custom KPIs live at the data level and are recalculated on every data update — not redone chart by chart. When a new tracker wave arrives, DataLion recomputes your metrics automatically.

So every KPI stays consistent across every wave: defined once in the codebook, applied the same way everywhere — with no export to SPSS and no formulas maintained somewhere on the side.

  • Computed at the data level, recalculated on every update
  • Applied consistently across every tracker wave
  • No SPSS export, no formulas maintained on the side
Computed KPI across several waves in DataLion

See DataLion with your own data

Start a free trial or book a personal demo — from raw data to a finished dashboard.

We now work much more efficiently, giving us more time to take care of the derivations and insights from the data for the customers.
Jens Falkenau, Vice President of Market Research · Nielsen Sports
Read the case study →

More data preparation

Common questions about custom KPIs

Which KPIs can I compute in DataLion?
You define your own metrics such as NPS, top-box indices, sum scores, ratios and derived scores — as computed columns via SQL right in the codebook.
How do I compute an NPS?
With a SQL expression using CASE WHEN, say CASE WHEN nps >= 9 THEN 1 WHEN nps <= 6 THEN -1 ELSE 0 END — promoters minus detractors. That turns NPS into its own metric, with no hand-work in Excel.
Are custom KPIs updated when new data arrives?
Yes. Custom KPIs live at the data level and are recalculated on every data update — including when a new tracker wave arrives. That keeps them consistent across every wave.
Is this statistical modeling like regression?
No. Custom KPIs are SQL-based columns on your data. For methods like regression or driver analysis, DataLion has its own analysis building blocks — separate from computed metrics.
Do I need SPSS or Excel for my own metrics?
No. You compute KPIs right in DataLion’s codebook, at the data level and with no export to SPSS or Excel.

Custom metrics that hold across waves

Try DataLion free: compute NPS, top-box indices and derived scores via SQL in the codebook — at the data level and consistent across every wave. Or book a demo.