FitMigrate

Apple Health Data Sources and Duplicate Records in Exports

By Josep Mampel Marques, updated

An Apple Health export lists every record from every source, so your iPhone, Apple Watch and any apps can each have written a row for the same minute. The Health app avoids double counting by ranking sources; the export does not. Apple's guide says that by default Health ranks data you enter manually first, then data from your iPhone, iPad and Apple Watch, then data from apps and Bluetooth devices. When you turn the export into CSV with FitMigrate, every row keeps a sourceName column so you can keep one source and drop the others before you add anything up.

Where sources are set in Health

Apple's help for managing Health data describes this path: in Health, choose a category and subcategory, such as Activity and then Steps, and scroll to Data Sources & Access. There you can reorder sources or turn off a third-party source. Changing the order changes what the Health app shows. It does not change which records exist or what the export contains.

What this looks like in a CSV

startDatevaluesourceName
2026-03-01 08:00:00 +0100412Your iPhone
2026-03-01 08:00:00 +0100398Your Apple Watch

The names and values here are an illustration, not real data. Two sources recorded the same walk, and the CSV has both rows. If you sum the column, you count it twice.

How to deduplicate

  1. Make the CSV: export from Health and tick the metric in FitMigrate. The steps are in how to export all Apple Health data.
  2. Open it in your spreadsheet and look at the distinct values in sourceName. In Excel or Sheets, a filter or pivot table shows them.
  3. Decide which source you trust for this metric, for example the watch for heart rate.
  4. Filter to that source and total or chart only those rows.

This gives numbers that are consistent but not necessarily equal to what the Health app displays, because Health may fill gaps from other sources.

Which metrics are affected

A worked approach for steps

Say you want daily steps for a year. Download the Step Count CSV and add a date column from the start date. Build a pivot table with the date as rows, the source name as columns and the sum of the value as the numbers. You then see, for each day, what each source recorded on its own. Pick the column you trust, or compare the two to see how far they drift apart. The sum across all columns is the number that counts overlapping activity twice, so do not use it as your daily total.

Size and tool limits

Deduplicating in a spreadsheet works for moderate files. Excel holds up to 1,048,576 rows per worksheet, and Google Sheets has a cell limit, so for a huge metric such as heart rate filter or split the file first. More detail is in Apple Health export to CSV.

What FitMigrate does not do

Note down which source you kept for each metric, so you can repeat the method on your next export. For the layout of the whole export, see what is inside the Apple Health export.

FAQ

Does the export apply my data source priority?

FitMigrate copies every record it finds and does not apply any priority or merge sources, so overlapping rows from several sources all appear. You choose which source to keep by filtering the sourceName column.

Can I change which source Health prefers?

Apple's guide says that under a subcategory you scroll to Data Sources and Access, where you can reorder sources or turn off a third-party source.

Why do my totals not match the Health app?

Health combines sources using its own ranking, while the CSV lists every record. Adding all rows together can count the same activity from two sources.

Sources