Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Double counting is a common issue in database design. When joining several incorrectly linked tables, some records may be duplicated and counted more than once. There are several cases which might cause double counting, and there's no uniform or automatic solution to these cases.

Double counting issues might happen to you during the development of projects on the platform. We've added a warning mechanism that will inform you when there's a risk of double counting. Let's have a look at some possible cases that might cause this error.

Example data model

Image RemovedImage Added

Info

The data model can be viewed in the application by hovering the Account icon on the bottom left of the Project page, and selecting Data model.

...

The solution is to switch the foreign key reference to point the other way. So, we will set the demography_postcode.postcode_id to point to the postcode dataset, the fixed model will look like this:

Image RemovedImage Added

And the metric result is correct, after drilling on the same administrative unit.

...