Migrating Bubble Reports: Reconcile Dashboard Totals and CSV Exports
A dashboard can look identical after a rebuild while answering a different business question. “Revenue” may now include unpaid orders. A customer count may count purchases instead of people. A CSV can contain the right total but the wrong customers.
When migrating Bubble reports to code, define each metric, preserve the permitted population, and reconcile the dashboard, its drill-down and its export against the same known dataset. This is reporting acceptance, not just a visual comparison or a database row-count check.
Start with reports people act on: the weekly operations summary, the account-usage dashboard, the customer export or the sales breakdown. If a report is no longer used, explicitly retire it rather than rebuilding it by default.
Write a report contract before choosing a chart library
For each important report, write down what a person believes the number means. Keep that definition beside the implementation and its acceptance examples.
A compact report contract should identify:
The business question, report owner and people allowed to use it.
The unit being counted: orders, line items, customers, subscriptions or another entity.
Included and excluded statuses, organizations and records.
The date field, reporting time zone and start/end boundaries.
The calculation, currency or unit, rounding rule and treatment of missing values.
The grouping, empty-group behavior and refresh timing.
The drill-down and export that should explain the result.
A label such as “Monthly revenue” leaves most of this unspecified. Does it mean orders created, invoices issued or payments received? Are refunds deducted in the payment month or attributed to the original order? There is no universally correct answer. Record the product's agreed definition rather than silently adopting whatever is easiest to query.
Separate deliberate improvements from migration parity. If the old report is wrong, retain the observed output, document the corrected rule and get the responsible product owner to approve the difference. Matching an existing mistake is not the same as preserving an agreed business requirement.
Trace the Bubble expression behind every number
The starting point is the actual expression, including its data source and transformations, not the displayed chart. A report might combine a database search, a custom state, an API result, a plugin or a precomputed summary.
Bubble's grouping and aggregation reference describes how grouped lists produce summary values. Inspect the grouping fields, bucket boundaries, aggregation fields and any transformations before or after grouping. A sum of a page-sized list is not necessarily a sum of all eligible records.
The Bubble data migration checklist addresses the underlying records and relationships. Reporting adds a different question: do those records produce the same agreed business answer?
Preserve the unit of calculation
Joining related records can multiply rows. An order with three line items may appear three times in an intermediate dataset. Summing its order-level total at that point can triple its contribution.
Decide which entity each metric measures before joining or aggregating. Counting distinct order IDs may fix an order count, but it does not automatically fix a repeated order-value sum. Keep a small example with multiple children per parent so this failure cannot hide inside a plausible grand total.
Do not add values with different units. If a report contains several currencies, keep currency-specific totals or document an explicit conversion policy and rate date. A display symbol is not a conversion rule.
Make empty and missing values intentional
Zero, missing and not applicable are different states. A dashboard should not turn an unknown value into a reassuring zero without an agreed reason.
For example, PostgreSQL's aggregate documentation distinguishes counting all rows from counting non-null values; a sum over no rows returns null. The replacement therefore needs an explicit display and calculation policy. Test no records, all-missing values, a genuine zero and negative adjustments separately.
Specify rounding at the calculation stage as well as the display stage. Rounding each line before adding it can differ from rounding the final total. Record the intended precision and any justified comparison tolerance instead of accepting “close enough” after seeing a discrepancy.
Compare the same reporting period and data version
Two screenshots captured at different times are weak evidence. A payment, cancellation or status edit between captures can explain a difference even when both implementations are correct.
Use a controlled staging fixture or a documented comparable snapshot. Record the dataset version, observation time, user identity and filters. If a live comparison is necessary, account for intervening changes rather than treating every difference as a migration defect.
For calendar reports, specify whether the period follows the viewer's zone or a fixed business zone. Test records immediately before, at and after the cutoff. The date and time-zone migration guide covers preserving those meanings in the underlying data.
Check bucket boundaries independently from the filter. Bubble's grouping reference notes that a final month bucket can contain the whole month even when the configured ending date is mid-month; an earlier list filter is needed when the report should stop on a particular day. Do not assume a chart's last label defines the data cutoff.
Decide what happens to late changes. Does a refund update a historical month? Does an archived customer disappear from previous totals? Is the report live, cached or an approved period-end snapshot? If summaries are cached or precomputed, test refresh after a creation, edit and deletion, and show enough freshness information for users to interpret the result.
Reconcile totals, groups and drill-downs together
Do not stop when the grand total matches. Two incorrect groups can cancel each other out, and the same sum can come from different records.
Compare at three levels:
Membership: which source records contribute, using a stable ID mapping if migration changes IDs.
Group results: each category or time bucket, including empty groups and uncategorized records.
Summary: totals, counts, averages and other displayed metrics.
Only require group totals to add to the overall total when the metric is additive and the groups do not overlap. Unique customers across several categories, percentages and averages often cannot be summed. Define their overall calculation separately.
Keep a discrepancy log with expected result, old result, new result, contributing IDs and explanation. Classify the cause as changed data, changed permissions, a calculation defect or an approved product change. That makes sign-off more meaningful than a screenshot marked “looks good.”
A fictional reconciliation example
Consider a test report for Organization A. It measures the total value of paid orders created during a specified October period, in USD, with each order counted once. It is an operational order-value report, not an accounting revenue-recognition policy.
The fixture contains DEMO-101 for $100 with two line items and DEMO-102 for $50 with one line item. Both are paid and in scope. DEMO-103 is an unpaid $25 order, and DEMO-104 is a paid $70 order belonging to Organization B.
The expected result for an authorized member of A is two orders totaling $150. The drill-down should identify DEMO-101 and DEMO-102. An order-level export should contain those two orders, not three line-item rows. A deliberately separate line-item export can have three rows, but it needs its own grain and reconciliation rule.
A result of $250 suggests that DEMO-101 may have been counted twice. A result of $175 suggests that the unpaid order may have been included. Neither diagnosis is automatic: inspect the contributing records before deciding on the cause. All names, IDs and amounts in this example are invented test data.
Treat CSV as a customer-facing interface
A download button is not evidence that the exported report is compatible. Someone may feed the file into another spreadsheet, a customer system or a recurring operational process.
Bubble's Download data as CSV reference exposes choices for data source, headers, captions, date formatting, separators, quoting and excluded columns. Inventory the current choices and identify which downstream consumers rely on them.
Test the actual file, not only the on-screen preview:
Does export include every permitted matching record, just the current page, or selected records? Label and test that choice.
Are column names, order, units and identifiers stable for existing consumers?
Do leading-zero identifiers, non-ASCII text, commas, quotes and line breaks survive?
Are dates and decimal values interpreted as intended in the supported spreadsheet or import tool?
Does an empty result produce an understandable file rather than a misleading success or broken download?
Does a large export complete without silently dropping records, and is a failed export visibly different from an empty one?
For a long-running export, capture the selected filters and permitted scope, define its as-of or snapshot policy, and test an edit during generation. The file should not silently combine different reporting states.
A CSV does not carry rich spreadsheet cell types. Test both its raw content and the way each supported consumer imports it. Keeping a leading zero in the file is different from preventing a spreadsheet program from interpreting that field as a number.
Untrusted text also needs an export-security check. OWASP's CSV injection guidance explains that spreadsheet software can interpret user-controlled values as formulas. Ordinary CSV quoting alone is not a universal defense, and some mitigations can change after saving and reopening a file. Have the implementation reviewed and test the supported consumption path rather than presenting a single escaping trick as a guarantee.
Protect summaries and downloaded files, not just rows
Report authorization applies to totals, group labels and exports as well as visible details. A user who cannot read another organization's records should not receive its totals unless an explicitly approved aggregate-sharing policy allows that summary.
Check the report as an ordinary member, a different organization's member and a user whose access has been revoked. Server-side generation, background workers and cached exports must preserve the intended authorization boundary. A hidden button is not that boundary.
For generated files, define who can download them, how long they remain available and what happens after a permission change. Test that a previously issued download link does not accidentally become permanent access. The privacy-rule migration guide covers the wider access model; the reporting check should demonstrate it on actual summary and export paths.
Accept the reporting behavior, not a matching screenshot
Before signing off, ask the team to demonstrate one known calculation, one excluded record, one empty period, one data refresh and one denied export. Keep the report contract, fixture, expected results and discrepancy decisions with the handover.
You do not need to rebuild every useful Bubble report immediately. A stable internal report may remain in Bubble during a phased migration if its data source, access and operating responsibility are explicit. The important decision is what the business needs to trust, not whether every chart uses the newest library.
Bubble to Code combines Bubble development and software-engineering experience. Its migration process includes mapping workflows, rebuilding the agreed product and checking critical paths. Reporting deserves its own acceptance evidence within that scope.
Frequently asked questions
- Is matching the total enough to approve a migrated report?
- No. Compare the contributing record IDs, group results and relevant drill-down or export. A matching total can conceal missing and duplicated records, incorrect grouping or unauthorized data.
- Should the dashboard and CSV always have the same row count?
- Only when they describe the same unit and population. A dashboard may summarize orders while an export intentionally lists line items. Define that relationship and reconcile it; do not force identical counts onto different report types.
- Do we need a separate analytics warehouse?
- Not automatically. Choose the reporting architecture from the required history, volume, freshness and access controls. A warehouse adds another data pipeline to operate and reconcile. First establish the report contract, then decide whether the application database, precomputed summaries or a separate system best serves it.
Sources
- 01grouping and aggregation reference · Bubble Docs
- 02PostgreSQL's aggregate documentation · PostgreSQL Docs
- 03Download data as CSV reference · Bubble Docs
- 04OWASP's CSV injection guidance · OWASP
Keep reading
Bubble to Code is an independent service. Not affiliated with, endorsed by, or sponsored by Bubble Group, Inc.
