> For the complete documentation index, see [llms.txt](https://docs.keewano.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.keewano.com/analytics/data-tables.md).

# Data Tables

Every other Keewano report answers a question we chose. This one answers yours.

## What Data Tables are for

Most Keewano reports answer a question we shaped in advance — Retention, Funnel, Progression each ask one thing and teach themselves. A Data Table asks nothing. It's a blank surface where you compose the question yourself, out of three parts, and read the answer as one grid.

It answers questions of the form **"this number, broken down these ways, compared across these groups of users."** You build it, press **Update**, and read the result.

#### When to reach for it

Reach for a **template** when your question already has a name. "What does our D7 retention look like?" is a Retention report — it'll be faster and better-looking than anything assembled by hand.

Reach for a **Data Table** when your question crosses shapes — several unrelated numbers side by side, an unusual row axis, two audiences compared column-for-column, or a ratio nobody built a report for.

What you get: one sortable grid, a pinned summary row, and a link you can share. It saves like any other report and reopens exactly as you left it.

#### Opening one

From **Exploration**, open the create-report dialog and choose the **Data Table** tile for a new report, or open a saved one from its card. A new report starts empty — no metrics, one unfiltered segment, the last 30 days — and the table simply asks you to select a metric to get started.

***

## The mental model

Learn these three ingredients and the rest is detail. Each maps to one part of the grid.

| Ingredient     | Becomes         | What it is                                                        |
| -------------- | --------------- | ----------------------------------------------------------------- |
| **Metrics**    | The columns     | The numbers you want to see. Each metric is one column group.     |
| **Breakdowns** | The rows        | What each row stands for. Stack two for a row per combination.    |
| **Segments**   | The sub-columns | Groups of users compared side by side. Each repeats every metric. |

![One table, three ingredients](https://3698466984-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FWQi6lbHOA8tyhBBRtvuQ%2Fuploads%2Fgit-blob-07ebd8891e17ddadb9b3600efae4fb476135c2a4%2Fdata-tables-ingredients.png?alt=media)

With no breakdowns the table has a single row labelled **Total**. With no segments each metric has one sub-column labelled **All users**. The example threaded through this guide builds one real report — *"which countries convert best in their first three days?"* — so each section adds a piece you can picture.

{% hint style="warning" %}
The table always shows the **last run** — never the settings you're editing right now. Change a metric, add a segment, move the date range, and the grid doesn't react. Those numbers keep answering your previous question until you press **Update**.

Nothing on screen marks the table as out of date, so the one habit worth building is: **edit, press Update, then read.**
{% endhint %}

***

## Metrics — the columns

A metric is a number you want to see, and each becomes one column group headed by its name. You add cards, then set two things on each: **what it measures** and **how it rolls up**.

### What you're measuring

The **measure** is the raw thing being counted. Seven to choose from:

| Measure            | Counts                                                                    |
| ------------------ | ------------------------------------------------------------------------- |
| **Event count**    | How many times a selected event occurred.                                 |
| **Sum values**     | A numeric property added up across matching events.                       |
| **Duration**       | Time elapsed between a start event and an end event.                      |
| **Sequence count** | How often a defined sequence of events occurred, within a window you set. |
| **Absence count**  | How often an expected event did **not** occur within a period.            |
| **Economy**        | In-product economy events — currency or items gained or spent.            |
| **Revenue**        | Money, in the streams you pick — purchase, ad, subscription, or all.      |

An eighth choice, **Function**, turns the card into a [formula](#formulas). Only **Event count** metrics can carry their own filters; the rest don't.

{% hint style="info" %}
**Worked example** — *Installs* is an Event count of `session_start`; *Paid within 3 days* is an Event count of `purchase`.
{% endhint %}

### How it rolls up

The **aggregate** decides how many raw events become one number. The card reads aggregate-first — "Count users of Event count."

| Aggregate         | The number it gives                                                                                             |
| ----------------- | --------------------------------------------------------------------------------------------------------------- |
| **Count users**   | How many users have any occurrences.                                                                            |
| **Sum**           | Everything added up, across all users.                                                                          |
| **Avg. per user** | The average per-user total.                                                                                     |
| **Median**        | The middle per-user total — half of users sit below it.                                                         |
| **Min / Max**     | The lowest / highest per-user total.                                                                            |
| **Percentile**    | The value below which that share of users falls. Presets 25 / 75 / 90, or any whole number 1–99 (shown as P90). |

{% hint style="info" %}
**Worked example** — Both our metrics use **Count users**; we want people, not raw event volume.
{% endhint %}

### How it reads

A small badge on each card opens the format popover. Formatting changes the **display** only, never the underlying number, so it repaints the table without a re-run.

| Unit       | Does                                                                                          |
| ---------- | --------------------------------------------------------------------------------------------- |
| **#**      | Plain count with thousands separators (the default). Optionally abbreviated — 12,400 → 12.4K. |
| **%**      | Multiplies by 100 and appends %, one decimal by default — 0.392 → 39.2%.                      |
| **$**      | Money, shown in dollars.                                                                      |
| **Custom** | Your own label — "coins", "sec" — as a prefix or suffix.                                      |

Underneath: decimals (0–20), abbreviation, prefix/suffix side, and **target direction** — tell the table whether up is good, and every cell takes a green or red tint by sign.

{% hint style="warning" %}
Target direction colours every cell in the column by the **sign** of its value, including columns where a sign carries no meaning. Use it on change-like numbers, not on raw counts.
{% endhint %}

***

## Breakdowns — the rows

Add a breakdown and every row of the table becomes one value of it. Add a second and you get a row per **combination** — which multiplies the table fast. Breakdown order is the grouping order: the first is the outer grouping, the second groups within it.

The choices, grouped as the picker presents them:

| Group                 | Rows                                                                                             |
| --------------------- | ------------------------------------------------------------------------------------------------ |
| **Common**            | Calendar day, Day in game, Country, Event data, Registration date                                |
| **Lifecycle / Time**  | Day in game, Session number, Day of week, Calendar day / week / month, Registration date / month |
| **Churn**             | Churn day, Churn day since reg.                                                                  |
| **Scoped (advanced)** | Start value, Session duration, Occurrence, Event count                                           |
| **Revenue**           | LTV                                                                                              |

Bucketed breakdowns — **LTV** and **Session duration** — group users into bands you define; thresholds must increase left to right, at most eight, all above zero (LTV) or from zero (duration). **Country** is special: it picks which users count rather than splitting the table on its own, so a second Country breakdown is always rejected as a duplicate.

{% hint style="info" %}
**Worked example** — One breakdown: **Country**, set to the five markets we care about.
{% endhint %}

***

## Segments — comparing audiences

A segment is a named group of users. Every metric is repeated once per segment, so two segments turn four columns into eight — each carrying the segment's colour on its header.

* **With no segments**, one column group per metric, labelled *All users*. That's the default, and often all you need.
* **Adding one** — a new segment starts as All users; press **Filter by** and narrow it (platform, country, paying status, app version…).
* **Naming and colour** — the name follows your filters automatically until the first time you rename it; after that it's yours and stops updating. Nineteen colours; the dot travels onto the column header.

{% hint style="info" %}
Breakdowns and segments share **one budget of five** — five between them, not five each. Add a fourth breakdown and you have one segment left. The disabled **+** says so: *"You can add up to 5 breakdowns and segments in total."*
{% endhint %}

{% hint style="info" %}
**Worked example** — Two segments: the default *All users*, plus *iOS*, filtered on Platform.
{% endhint %}

***

## Filters

There is no report-wide filter on this page. You filter at two levels: a **segment** (narrowing who is counted in its columns) or a single **Event count metric** (narrowing only that one number). Everything else is set once, on the segment.

### The Add filter dialog

The same dialog opens from a segment's **Filter by** and from an Event-count metric's filter button. Pick a property on the left, choose **Contains** or **Does not contain**, tick values in the middle, review on the right, then **Apply**. Nothing takes effect until Apply — **Cancel** discards the draft.

|                      |                                                                                                                                                      |
| -------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Basic filters**    | Install date, Current / First app version, Countries, Language, Device, Platform, Paying status, Acquisition channel                                 |
| **Advanced filters** | Test user, and event-based rules — Must / Must not contain (any), Keep / Exclude events and event types, Start / End event, Merge consecutive events |

**How values combine:** within one property, several values are alternatives (match *any*); across properties, the conditions add up (match *all*). A property with nothing selected is simply dropped.

Two things to expect: some properties can only be included, never excluded — the operator toggle just won't appear; and changing a metric's event clears the filters you'd put on it, since they were chosen against the previous event.

{% hint style="info" %}
**Worked example** — The *iOS* segment carries one filter: Platform contains iOS.
{% endhint %}

***

## Formulas

Choose **Function** as the measure and the card becomes a formula — an expression box plus lettered operands. This is how a ratio, a rate, or a per-user average gets its own column.

Write the expression with the operand letters — `A/B*0.75`. Parentheses and `+ - * /` all work, and dividing by zero returns 0 rather than an error. Each operand is one of two kinds:

* **Reference** — points at a metric already in the report; edit that metric and the formula follows.
* **Inline** — defines its own measure on the spot, private to the formula, with no column of its own.

#### Three rules that will bite

* **Order matters.** A formula may only reference metrics defined *above* it; dragging it above one of its operands is refused.
* **One filter set.** A formula can't combine metrics with different filters — filter the segment instead.
* **Reference ≠ Inline.** Switching an operand from Reference to Inline copies the definition and cuts the link, so later edits to the original stop reaching it.

{% hint style="warning" %}
Dividing by zero produces **0**, not an empty cell and not an error — so a zero in a formula column is ambiguous between a real zero and a division by zero.
{% endhint %}

{% hint style="info" %}
**Worked example** — *Conversion* = `A / B`, where A is *Paid within 3 days* and B is *Installs*, formatted as %.
{% endhint %}

***

## Running and reading the table

### Update runs it

Nothing recalculates until you press **Update**. It always asks the query service afresh — it never reads a cached result — and while a run is in flight the button reads *Updating…*. Update is disabled, with the reason in its tooltip, when a card has a problem or there are no metrics yet; an unfinished metric is simply left out and the report still runs.

### The summary row

A pinned row at the top folds each column's values into one number; the dropdown switches it between Average, Sum, Min, Max, Median. It folds the rows **currently on screen** — it is not a re-aggregation over all users. (More on why that matters [next](#reading-the-numbers-correctly).)

### Sorting

Click a column header to sort by it (click again to reverse), or use the **Sort by** menu above the grid for the breakdown columns and the summary value. A breakdown-column sort keeps the table grouped by the first breakdown. Empty cells sort to the bottom either way, and bucketed rows (LTV, session duration) sort by bucket order, not alphabetically.

### Saving, sharing, exporting

Name it in the top bar and press **Save**; the button then reads *Saved*. **Copy link** stays disabled until the report is saved (*"Save the report to get a link"*). Right-click the table to **Copy** a selection or **Export** it to CSV or Excel — an export writes exactly the rows, columns, and sort you're looking at.

{% hint style="danger" %}
Leaving by the back arrow or the sidebar **discards unsaved edits without asking**. A browser refresh or tab-close does prompt. When in doubt, Save first.
{% endhint %}

{% hint style="info" %}
**Worked example** — Update, sort by *Conversion* high→low, and the best-converting market is the top row.
{% endhint %}

***

## Reading the numbers correctly

A few places where a correct number can look wrong, or a wrong one can look fine. Worth knowing before you trust a surprising cell.

### Segments don't add up — and that's right

Each segment is asked for separately. Segment columns are not slices of one result: two segments with overlapping filters both count the users they share, and even two segments that together cover everyone won't sum to the all-users figure for a distinct-user metric. An unsegmented report and a two-segment one are different questions.

### The summary row is of what's on screen

The pinned row folds the **visible rows**, not the underlying data. For a distinct-user metric, the average of per-row values isn't the overall number of distinct users, because a user active in two rows is counted in both. Same for percentiles, mins, and maxes.

### Empty cells are not zero

An empty cell shows a dash and means no value came back for that row-and-column — an unfinished metric, a part of the run that failed, a row that exists for one segment but not another, or a cell dropped at the size limit. Zero is displayed as zero. In a formula column, though, a real zero and a division-by-zero look identical.

### A few measure-specific truths

* **"LTV" means revenue inside the date range**, not lifetime value — the range decides which events the calculation sees. Narrowing the range moves users into lower buckets. A true lifetime figure needs a range wide enough to cover everyone's whole history.
* **Avg. per user on revenue is per&#x20;*****paying*****&#x20;user**, because the revenue measure only counts users who produced revenue. For revenue across the whole population, divide a revenue metric by a user-count metric with a formula.
* **Money reads correctly as `$`.** A revenue figure shown as a plain count is in **cents** (100× the dollar figure) — expected, not a bug. Show money as `$` and it reads as money.
* **Country is often "Unknown" on early days**: the event that establishes a user's country arrives after the first day-in-game marker, so install-day rows are largely Unknown while later days resolve. That's how the data arrives.

***

## Limits, and what surprises people

None of these are errors — they're the places where the report does something reasonable that may not look like what you asked for.

| What                             | What actually happens                                                                                                             |
| -------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- |
| **5 breakdowns and segments**    | Combined, not five each — the two sections share one budget, and the **+** disables when it runs out.                             |
| **32 metrics**                   | The header counts for you — *Metrics (3/32)*. Inline formula operands count too, though you never see them as columns.            |
| **An unfinished metric**         | Wears an *Incomplete* badge and is silently dropped from the run — the report still works, just without that column.              |
| **"These metrics did not load"** | Part of the query failed. The table looks normal but is missing those columns; re-run, or narrow the setup.                       |
| **"Query too broad"**            | You asked for more cells than the engine returns. The numbers shown are **partial** — shorten the date range or drop a breakdown. |
| **A second Country breakdown**   | Always rejected as a duplicate. Country selects users rather than splitting rows.                                                 |
| **Hiding every metric**          | Replaces the grid with *"All metrics are hidden."* Un-hide one from the settings panel.                                           |
| **Empty cells**                  | Show a dash — "no data for this combination," not zero.                                                                           |

### The output limit is the one that surprises

A single query can ask for 32 values, and it counts **per query, not per report** — each metric costs one, and each inline formula operand costs one more. Metrics with different filters are sent as separate queries, so a large report can plan more than 32 in total and still be fine, while a smaller one can trip the limit.

If you hit it: prefer **Reference** operands over inline ones (a reference reuses an existing column and costs nothing extra), write a plain division (one operand over another costs a single value), or remove metrics you aren't reading.

{% hint style="success" %}
**The one habit:** edit, press **Update**, then read. Everything else is recoverable.
{% endhint %}

***

## When a Data Table isn't enough

A Data Table composes a question out of metrics, breakdowns, and segments. Some questions don't fit that shape:

* **A question you'd rather just ask** — describe it in plain language in [Keewano Ask](https://docs.keewano.com/analytics/keewano-ask.md) and skip the setup.
* **A number this grid can't express** — write it yourself in [SQL Query Studio](https://docs.keewano.com/sql-query-studio/guide.md), which reads the same events from any Postgres client or BI tool.
* **A question about order** — what users did *before* something, or in what sequence — belongs in [Lua Scripting](https://docs.keewano.com/lua-scripting/guide.md), which walks each user's timeline in order.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.keewano.com/analytics/data-tables.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
