Existing software · Reporting
Consistent calculations across reports and dashboards
Two views in the same application displayed different statistics for the same data. We traced the divergent rules and replaced duplicated calculations with a shared function, protected by consistency tests.
The context
The application brought together reports and questionnaires and offered several analytical perspectives. Users could explore information in a dashboard and in another analytical view. Matching filters and records needed to produce compatible results.
The problem
One dashboard endpoint calculated its statistics independently. Over time, its filtering, field mapping and value parsing had drifted from the rules used by the other view. The total analysis count could be identical while detailed statistics differed.
Our contribution
- We compared the calculation paths using the same data and filters.
- We identified differences in excluding flagged entries, accepting field names and interpreting values.
- We removed the duplicated aggregation and connected the dashboard to the shared calculation function.
- We added tests that compare the two paths so a future divergence can be detected.
How the work was checked
Verification focuses on consistent results from matching inputs. The tests compare endpoints that should follow the same rule, rather than checking each calculation in isolation. The documented contribution is the correction to the calculation logic and its test coverage.
What this means for similar projects
A dashboard can look correct in isolation and still contradict a report. When several screens express the same business rule, a shared calculation and checks across results reduce the places where that rule can diverge. This foundation also matters before adding AI-generated explanations or summaries.
YOUR NEXT PROJECT
