The full power of TDengine, now free forever for up to 5,000 tags.

Explore More

Why Historian CSV Numbers Differ from the Trend Display

Juno Qiu

November 12, 2026 /

Compare three representations before changing historian settings: the source’s returned numeric value, the literal text in the CSV, and the value the receiving application imported. A difference can begin in any of those layers. More displayed decimal places can expose an existing binary approximation; fewer displayed places can hide a value that is still present. Import conversion can also discard digits permanently.

For an integration engineer delivering process measurements to reports or analytical tools, the aim is to locate the first actual change and define an appropriate export contract. Rounding all historian inputs to match a chart is not a reliable diagnostic.

Capture one identifiable record in three places

Choose a tag and source timestamp, retain its unit and quality, and use the same retrieval mode throughout. A chart’s interpolated point and a recorded event can differ legitimately; eliminate that mismatch before investigating numeric representation.

LayerEvidence to saveQuestion it resolves
Source/API resultOriginal response, numeric type and sufficient precisionWhat number did the interface actually return?
Exported fileUnmodified CSV text plus delimiter and encodingDid export change the number or only its textual notation?
Receiving applicationImport settings, column type and underlying cell/query valueDid parsing, inference or later formatting change it?

Inspect the CSV as text before opening and saving it through a spreadsheet. Keep an original copy. A second save can overwrite the evidence of which layer changed the value.

The public Power Chart CSV discussion describes a measurement that appears with two decimals on screen but longer fractions in export. Replies point toward floating-point representation and display formatting. That is useful problem evidence; it does not establish that every CSV discrepancy has the same cause.

Separate binary approximation from display rounding

Consider a synthetic measurement intended as 23.56 °C. If encoded as IEEE 754 binary32 and then represented with enough decimal digits, that stored value is approximately:

23.559999465942383

Formatting it to two decimal places produces 23.56. The underlying approximation differs from the intended decimal by about 0.000000534 °C. Whether that matters depends on the measurement and calculation requirements. The long fraction is not evidence of additional sensor accuracy, and the short display does not prove an exactly stored decimal.

Python’s official floating-point tutorial explains why many decimal fractions cannot be represented exactly in binary and why formatting changes their display. This explanation applies to the mechanism; it does not imply that Ignition runs the cited Python version or that every tag uses binary32.

Source precision loss is a different issue. Schneider Electric’s SCADAPack FAQ documents 32-bit floating-point accumulators losing small increments at large totals. If information was lost before export, displaying more decimals or importing into a wider column cannot reconstruct it. Capture the source type and original values before deciding where a repair belongs.

Check import types before blaming the file

Scientific notation such as 1.00E+07 may be only a display format. Inspect the underlying value. If the CSV text contains a fractional amount but the imported value no longer does, review numeric type conversion rather than merely widening the displayed column.

Long identifiers and high-precision timestamps deserve explicit types. Microsoft documents Excel’s 15-digit numeric precision limit and import guidance. A 19-digit event identifier should normally enter a spreadsheet as text. Formatting an already converted numeric cell as text does not recover digits previously discarded. Reimport from the unchanged original file with a text type selected before conversion. Options and menus vary by Excel version and platform.

CSV quotation marks delimit fields; they do not universally force the receiving application’s column type. An importer can still interpret a quoted digit string as a number. Supply an import schema or instructions when exact identifiers must survive.

Locale can introduce another mismatch. If 23,56 is intended as a decimal-comma value, a comma-delimited export must quote the field correctly, and the receiver still needs the intended decimal convention. If it is parsed as two columns or text, the failure is not explained by binary floating point. Confirm delimiter, decimal separator, thousands separator and type inference using literal file text.

Define a machine export separately from a presentation export

A machine-consumption contract should specify identifiers, timestamp representation, unit, quality, null representation and numeric encoding. Preserve enough precision for the intended round trip using the source type’s supported representation. Use an explicit policy for nonfinite or invalid values rather than silently replacing them with zero. For TDengine TSDB schemas, check numeric types and precision against that contract.

A human report may deliberately show two decimals. Keep that formatting in a presentation field or clearly labeled report export when the original precision is still needed for calculations. If decimal quantization is a business requirement, document the scale and rounding rule. Converting an already approximated binary value to a decimal type does not recover the original intended measurement automatically.

Do not increase the number of significant figures as a claim about measurement accuracy. Instrument resolution, calibration uncertainty and numeric representation are separate properties. The historian quality article provides the related boundary: even a perfectly preserved number may be unsuitable for the intended calculation.

Prove the round trip with deliberate test values

Test a fractional measurement, a large total with a small increment, a negative value, a leading-zero identifier, a long identifier and an invalid or absent reading. Include the actual time format and locale used by the receiving application.

For identifiers, compare exact strings. For numeric measurements, compare decoded values using the contract’s accepted absolute/relative tolerance or exact-decimal rule. A universal tolerance is inappropriate: the allowed loss for temperature is not automatically suitable for a custody-transfer quantity. Compare quality and unit as well as value.

Record which layer introduced any unacceptable change and repeat the test after fixing that layer. Acceptance means the receiving application retains the agreed values and identities, while its display uses the intended precision. A chart and a CSV do not need identical typography; they need compatible meaning and a traceable explanation for any numerical difference.

Related Articles