Analytics works perfectly in development but shows incorrect totals in live app

Hi everyone,

I’m having an issue where my analytics calculations work correctly in development mode, but show incorrect totals in the live app.

Current setup:

  • Bubble app with Income Entries datatype
  • Analytics page groups entries by date and sums amount
  • Date filtering is applied correctly
  • Privacy rules are enabled and “view all fields” is checked
  • Live database definitely contains the correct records
  • Workflows are working
  • Searches use Current User constraints

Problem:
Development version shows correct:

  • total earnings
  • highest earning day
  • grouped source totals

But live version gives incorrect values.

Example:

  • Real earnings = £435
  • Live analytics says best day = £90
  • Development correctly shows the proper totals

Additional details:

  • I recently changed week start/day filtering logic
  • I also have both:
    • a text field called “source”
    • and a linked datatype field called “income source”

I’m wondering if inconsistent field usage between development/live data could be causing grouped searches to calculate differently.

I’ve already checked:

  • privacy rules
  • browser cache
  • live data exists
  • deployed latest version
  • date fields/timestamps are correct

Has anyone experienced grouped searches behaving differently between development and live due to:

  • linked datatype inconsistencies
  • old live records
  • grouped by date behaviour
  • missing linked references
  • timezone/live database differences?

Any help massively appreciated because I’m clearly missing something obvious.

The attached pic showing highest earning day is £90 but it should say £370

Just so you know, the databases for the dev and live versions are separate. So the entries you have in both may be different unless you deliberately copied from one to the other.

Even if that’s not the case, I would still double check the Privacy Rules.

The dual field situation you described is almost certainly the culprit. Having both a plain text “source” field and a linked datatype “income source” field means old records probably have data in one and new records in the other, so grouped searches are splitting totals across two different fields instead of combining them. Worth auditing whether your live data has consistent field population and whether your searches reference the right field in both environments.