Quick answer
Data granularity is the level of detail a dataset stores: what one row represents, from one row per event with timestamp, user and properties (fine) to one row per day of totals (coarse). Fine data rolls up to coarse; coarse never splits back, so grain is set at collection time.
Formula: Rows per month = events per day × days (event grain), or buckets per day × days (rollup); storage ≈ rows × bytes per row
What is data granularity?
Data granularity is the level of detail a dataset stores: what one row represents. The Kimball Group calls this the grain of a fact table: a binding contract declared before you pick dimensions or measures. A table whose grain is "one signup event" is fine-grained: every row carries a timestamp, a user and event properties. A table whose grain is "one day" is coarse-grained: on a day with 2,000 events, the event-level table holds 2,000 rows while the daily table holds 1.
The trade-off runs in one direction only. Fine data can always be rolled up into coarse data; coarse data can never be split back into fine data. That makes granularity a collection-time decision, not a reporting-time one: collect too coarse and the missing detail is unrecoverable, collect too fine and you pay for it in storage and privacy. Rows you never stored are raw data you can never export later.
Three axes: time, dimension, identity
Most explanations stop at time granularity, but a row's grain is set along three independent axes. You can hold daily totals (coarse time) yet split them by SKU (fine dimension), or keep every event (fine time) but only as anonymous counts (coarse identity).
| Axis | Coarse → fine | What finer rows let you answer |
|---|---|---|
| Time | month → week → day → hour → event timestamp | Not just "did signups drop this week" but "which hour collapsed". Apache Druid buckets timestamps into UTC granularities from second to year; PostgreSQL's date_trunc('hour', …) or date_trunc('day', …) performs the same fine-to-coarse truncation in SQL. |
| Dimension | country → city → street; category → SKU | Which city or which product drove the change, instead of a national or catalog-wide average. Each event property you collect adds one dimension you can slice by. |
| Identity | anonymous totals → account → user → session → event | Whether the same person came back, which account churned, what one session did before an error — none of this survives in anonymous counts with no persistent ID. |
Do not confuse granularity with cardinality: granularity is what one row represents; cardinality is how many distinct values a column takes. A table can have one row per event (fine grain) and a country column with only 3 values (low cardinality). Defining which properties each event carries is the job of an event schema.
Worked example: same data, different answers
Sample data: a site's sessions and signup conversions over 14 days, split by day type.
| Segment | Week 1 | Week 2 |
|---|---|---|
| Weekdays | 5 × 1,000 sessions, 50 conversions/day → 250/5,000 = 5.0% | 5 × 1,000 sessions, 55/day → 275/5,000 = 5.5% |
| Weekend | 2 × 200 sessions, 4 conversions/day → 8/400 = 2.0% | 2 × 1,000 sessions, 22/day → 44/2,000 = 2.2% |
| Weekly total | 258/5,400 = 4.78% | 319/7,000 = 4.56% |
Read at weekly grain, conversion fell 0.22 percentage points: "the funnel got worse." Read at daily grain split by day type, both segments improved (5.0% → 5.5% and 2.0% → 2.2%). What changed is the mix: weekend sessions went from 400/5,400 = 7.4% of traffic to 2,000/7,000 = 28.6%, and that low-converting traffic diluted the average. Same rows, opposite conclusions — the weekly rollup had thrown away the day-type dimension needed to tell a product problem from a traffic-mix shift.
Now a debugging question: "why did day-3 signups drop?" Assume 2,000 events/day for 30 days (sample data). What each stored grain can answer:
| Stored grain | Rows/month | What you can see | What stays invisible |
|---|---|---|---|
| Daily totals | 30 | Day 3 had 40 signups vs the usual 60 | Which hour; which step; which users |
| Hourly rollup | 24 × 30 = 720 | The collapse ran 14:00–16:00 | Why: no error codes, no paths |
| Event level | 2,000 × 30 = 60,000 | Rows with error_code=502; rebuild the session path to the failing step | Nothing about this question |
The storage math (sample sizes: 200 bytes/event row, 120 bytes/rollup row): 60,000 × 200 B ≈ 12 MB; 720 × 120 B ≈ 86.4 KB; 30 × 120 B ≈ 3.6 KB per month. Event level costs 2,000× the rows of daily and about 83× the rows of hourly. Cheap in absolute terms here — but multiply by your real traffic and every property you add.
Choosing a grain: decision rules
Four if-then rules:
- Declare the grain before you build the table or the tracking plan. Write "one row represents …" first; dimensions and measures follow. Kimball treats the grain as a contract because everything downstream assumes it. A tracking plan is where that declaration lives on the collection side.
- If the questions are not yet known, collect at atomic grain. Event-level rows answer questions you have not thought of; every rollup can be computed later with
date_trunc+SUM. A pre-aggregated table has already baked in a guess about which questions matter. - If the questions are fixed and known, coarse is enough. A daily KPI dashboard does not justify keeping every event indefinitely; collect or retain at the grain you will actually query.
- Treat coarse as irreversible, and keep one grain per table. You cannot recover hours from days. And per Kimball, different grains belong in different physical tables — never mix event rows and daily totals in one table, or every query needs a filter just to avoid double counting. Rolling fine into coarse is the operation covered in data aggregation; this page is about choosing the grain in the first place.
Storage, privacy and retention
Fine grain has three costs:
- Storage and query cost. From the math above, event level is ~12 MB/month per 2,000 daily events versus ~3.6 KB for daily totals, growing linearly with traffic and row width. At warehouse scale the layout matters too: BigQuery time-unit column partitions can be hourly, daily, monthly or yearly, and that partition granularity determines how much data a date-filtered query scans — and what you pay.
- Privacy exposure. Event rows with a persistent user ID and properties are personal data. GDPR Article 5(1)(c) requires personal data to be "adequate, relevant and limited to what is necessary" (data minimisation), and Recital 39 says storage periods should be limited to a strict minimum. The finer the identity grain you keep, the stronger your justification needs to be. (This is an engineering summary, not legal advice.)
- Retention asymmetry. A common pattern — and TapCub's behavior — is that raw detail past the retention window is deleted and unrecoverable, while anonymous daily aggregates contain no personal data and survive. Retention effectively coarsens your history over time: last week you can debug at event level, last year only at daily totals. Plan exports before the window closes, and see collection tiers for how identity grain is set at collection.
Common mistakes
- Averaging rates instead of weighting them. The unweighted mean of week-1 daily rates is (5 × 5.0% + 2 × 2.0%)/7 = 4.14%, but the true weekly rate is 258/5,400 = 4.78%. When you roll up, recompute from sums (conversions ÷ sessions), never from an average of averages.
- "Finer is always better." Finer is more optionality, at a real storage and privacy price. Collecting detail nobody queries pays both costs for nothing.
- Confusing granularity with cardinality. Adding a high-cardinality column does not make the grain finer, and one-row-per-event does not make every column high-cardinality. They are separate properties; see cardinality.
- Changing grain mid-project. If month 1 is stored per session and month 2 per event, the periods are not comparable and trend charts silently break. Keep one grain per table; version any change explicitly.
Data granularity in TapCub
Take the worked example: your weekly report says conversion "got worse" (4.78% → 4.56%), and you have to decide whether it is a product problem or a traffic-mix shift. In TapCub the investigation walks down the grain ladder, and how far down you can go was decided when the data was collected and how long it was kept.
- Change the time grain before you change the conclusion. In All-platform analytics › Behavior › Behavior analysis, the builder's granularity is auto, hour, day, week or month. Put sessions and the signup conversion on one chart and switch from week to day: week 2's two weekend days jump from 200 to 1,000 sessions while converting near 2%, which is the mix shift from the example, not a broken funnel.
- Drop to hours, then to rows. Switch granularity to hour to find the 14:00–16:00 collapse from the debugging example. To see which events carried
error_code=502, open the SQL tab in the same builder and query thev_eventsview for that window; results return up to 50,000 rows. - Export before retention coarsens your history. Event rows are kept for the project's retention days (365 to start with, capped by the plan) and then deleted; daily aggregates contain no personal data and are not deleted on that timer. Last week can be debugged at event level, last year only at daily totals. If you may need the rows later, create an async export job in All-platform analytics › Data › Data export while they still exist.
- Choose the identity grain at collection. Configuration › Privacy center sets the collect tier: tier 1 is an anonymous aggregate (the salt rotates daily, no persistent ID, autocapture and identity calls dropped), tier 2 is the default cookie-free pseudonym, and tier 3 can use a device ID and login only when the project is in identified mode. In the EEA and UK, a hit without analytics consent falls to tier 1, and pageviews and custom events are still stored. "Which user did this" cannot be answered later for hits collected at tier 1.
The console has no raw-row browser outside SQL and export, and TapCub cannot recreate rows it never stored or already deleted. That is the thesis in product form: decide the grain at collection, because coarse data cannot be split back into fine data.
See also: Aggregation Definition: What It Means and How It Misleads.
Sources
- Kimball Group, Grain (Dimensional Modeling Techniques).
- Apache Druid documentation, Query granularities.
- PostgreSQL documentation, Date/Time Functions and Operators (
date_trunc). - Google Cloud documentation, BigQuery partitioned tables.
- EUR-Lex, Regulation (EU) 2016/679 (GDPR), Art. 5(1)(c) and Recital 39.
Was this explanation clear?
We use your answers to fix and expand this page.
Couldn’t send. Please try again in a minute.
Thanks for the feedback. We’ll use it to improve this page.You’ve already sent feedback on this page. Thanks.

Technical Engineer
Focuses on tracking code, SDKs, and API integrations, with practical guidance on implementation checks and troubleshooting.