Correct data afterwards

A sensor reads 500 °C for ten minutes. A meter is unplugged for service and reports zero all morning. A probe was calibrated two degrees off for a month. The readings are stored as they came - and you can put them right afterwards, for one tag and one stretch of time.

Corrections are on every plan.

Last updated

Three things you can do

  • Mark as bad. The readings are kept, but left out of charts, hourly and daily values, the normal range, alerts and reports. You can bring them back later.
  • Remove readings. The readings are removed for good. This cannot be undone, so it takes an Admin.
  • Adjust values. Each reading becomes reading × factor + offset: a factor of 1 and an offset of -2 for a probe that read two degrees high, a factor of 0.001 for a meter that sent Wh under a tag in kWh. On/off and whole-number readings are left as they are. Readings in the range that are marked as bad are adjusted too, so they are right if you bring them back; the check counts them apart, since no chart shows them. A factor and offset so large that the readings' own values would be lost are refused: to take readings out, mark them as bad or remove them.

How to do it

  1. Open Tags, choose the tag, and press Correct data…
  2. Choose what to do and the range. The start is included, the end is not.
  3. Press Check. Nothing is changed yet: you are told how many readings, in how many hours, the correction touches - and for an adjustment, what the values are now and what they will be.
  4. Press the button that names the action and the number, such as Mark 412 readings as bad.

If new readings arrived in the range between the check and the confirmation, nothing is changed and you are asked to check again. A correction covers at most 31 days at a time.

A month of a fast tag is a lot of readings, and a correction of it can take a minute or two. If the dialog gives up waiting, the correction still finishes. Check the range again before you repeat it: for an adjustment, the check says when the same one was last made, so that it is not made twice.

What follows a correction

The hourly and daily values of the range are rebuilt at once from the readings that count, so every chart at every zoom shows the corrected history. Computed tags that use the tag follow, because they are calculated from its hourly values when they are read. The tag's normal range is learned again. Reports made afterwards use the corrected values.

Where readings were removed or marked, an hour with none left shows the last value before the gap, for up to a day - as between any two readings. An hour and a day that nothing reaches any more disappear.

Every correction is recorded: a marker over its range on the tag's charts, with what was done, how many readings, who did it and when. Nobody can edit that record. The same correction of the same range again within a day is the same marker, which then says how many times it was done.

What cannot be corrected

  • History kept as hourly values only. Full resolution is kept for 14 days on Free, 1 year on Pro and 2 years on Pro XL and Business; a correction can start a day inside that. For a tag with older history, the first day of its full-resolution readings cannot be corrected either. The dialog says from when you can correct, and a range that starts earlier is refused with that date.
  • Computed tags. They have no readings of their own: correct the tags they are calculated from.
  • The tag's lifetime figures. Its all-time minimum, maximum and average, its latest value tile and your plan's reading counters keep what they counted. No chart reads them.
  • While an import is running into the account, or for about half an hour after Tag Historian has been updated. You are told to try again; nothing is changed.
  • Two at once. An account runs one correction at a time, and makes at most 200 new corrections in 24 hours. Readings cannot be removed from a day while an export of your account is reading that day; marking them as bad works meanwhile.

Through the API

With a key that may write (an Admin key to remove):

  • POST /api/corrections with tag, operation (markBad, restore, delete or adjust with factor and offset), from and to. This is a dry run: it answers readings, hours, days and a confirm token, and changes nothing. For an adjustment it also answers readingsMarkedBad (adjusted too, and not in readings or the minimum and maximum) and sameCorrectionAt, the time the same adjustment was last made to the range if that was in the last 24 hours.
  • The same request with "dryRun": false and the confirm token makes the correction. It answers what was rebuilt; complete is false, with problems, if a rebuild could not finish.
  • GET /api/corrections/window?tag=… answers correctableFrom.

A refusal has a code and a sentence: before_raw_data (with correctableFrom), changed_since_preview, nothing_to_correct, import_running, correction_running, admin_only, not_reversible (an adjustment the readings would not come back from), too_many_corrections (status 429), or busy with a Retry-After header.

Common questions

Can I undo a correction?
Marking as bad, yes: bring the readings back for the same range while the full-resolution readings are still kept. An adjustment is undone by the opposite adjustment; one so large that the readings could not be brought back is refused. Removing readings cannot be undone.
Who can correct data?
Editors and Admins, and an API key that may write, can mark readings as bad, bring them back and adjust them. Removing readings takes an Admin.
How far back can I correct?
As far back as your plan keeps full-resolution readings, less a day. Older history is kept as hourly and daily values, and those cannot be corrected yet.
What does the chart show where I removed readings?
The last value before the gap, held until the next reading, for up to a day - what it shows between any two readings. A gap longer than a day, or one at the end of the data, is empty.
Is there a record of what was corrected?
Yes. Every correction is on the chart as a marker over its range, with who made it and when, and in the account export.

Try it on the free plan

5 tags, 50,000 readings a day, 14 days at full resolution and ten years of hourly summaries. €0, no card.