Units of measure

Type it in any unit.
Store one number you can add up.

A stock list where one person enters grams and the next enters kilograms is a column you cannot total. RowFold gives the column a unit, converts on the way in, and shows every value in the unit the column is actually held in.

01What it looks like

This is a real RowFold grid, captured from a running instance. The weights were typed as 12.4 kg, 48 g, 6800 g and 0.62 kg; the lengths as 2.4 m, 35 mm and 2000mm. Nothing was normalised by hand first.

A RowFold grid of ten stock items. The Weight column header reads WEIGHT (KG) and its cells read 0.115 kg, 4.35 kg, 2.4 kg, 1.9 kg. The Length column header reads LENGTH (M) with cells 0.085 m, 0.36 m, 1.2 m. The Unit price column shows amounts in four currencies. The footer row reads SUM 29.76 kg, SUM 7.61 m, and SUM $495.88 of 10 — 1 needs a JPY→USD rate.
Mixed entry, one stored unit. The header names it, every cell reads in it, and the footer totals in it. The money column is a different feature — it is in the same shot because a distributor needs both.
Plain English: you type whatever unit is in front of you. The column keeps one number, in one unit, so sorting, filtering, totals, formulas and exports are all comparing like with like.

02Stored once, in one unit

A Number or Currency column can declare a canonical unit — the unit its values are held in. Type 1200 g into a column held in kilograms and 1.2 is what lands in the cell. The conversion happens once, at the moment of writing, which is what lets everything downstream stay simple: a total is a total, a filter is a comparison, an export is a number a spreadsheet will accept.

What you typed is kept. The entered value and its unit ride alongside the stored number. Reopen the cell and it offers back 1200 g, not 1.2; the cell's tooltip says Entered as 1200 g. So a column can be filled by five people using three different units and still be one clean set of numbers, without anyone losing their own record of what they wrote.

A field row in RowFold's schema editor. The field is named Weight, its type is Number, and a unit picker is set to Kilogram (kg). A ticked checkbox reads 'Accept other units of the same kind'.
The unit is a setting on the field's own row, beside its name and type. Untick Accept other units of the same kind and the column takes bare kilograms only.

It is a property of the column, not a new field type. That matters more than it sounds: a Quantity type would have to be taught to every write path, every view, every export and every rule about what may be written where. A unit on a Number field inherits all of that for free, which is why a quantity column filters, groups, sorts, charts and exports exactly like the plain number it still is.

03Every way a value arrives

Conversion applies wherever a value can be written, not just where it is convenient:

WhereWhat happens
Typing in a cell300mm into a metres column stores 0.3. A unit it cannot resolve is refused on the spot, with the reason.
Paste and fill-downA pasted block converts cell by cell. A cell whose unit cannot be resolved is skipped and counted, rather than written raw — the paste tells you how many it left alone.
Bulk editSetting a whole selection to 2.4 m stores the canonical number on every row, exactly as typing it into one of them would.
New recordsA record created with seed values converts them as it is created.
Spreadsheet importThe likeliest place for a genuinely mixed column, because that is how the source system printed it. A cell whose unit cannot be read keeps its raw text for the import's own validation to report — an unattended run over 5,000 rows must not abort on row 4,881.
Why this is listed rather than assumed: a converter wired into only some write paths is worse than none. The same text would convert when typed and store a literal when pasted one row down — two cells, the same input, a thousandfold apart, with no error either time. All of these go through one converter.

04Refused, never guessed

Every unit belongs to a class — a kind of thing being measured. Converting inside a class is exact arithmetic. Converting across one is not arithmetic at all, so RowFold declines:

  • Across classes, conversion is refused. Kilograms to metres depends entirely on what is being measured, and there is no factor that holds for every record. A silent 1:1 fallback is precisely how a number ends up wrong by three orders of magnitude with nothing raised.
  • A unit the workspace does not have is refused“'stone' isn't a unit in this workspace.” — rather than being dropped so the bare number lands.
  • A column that only takes its own unit says so“'Weight' only takes kg.”
  • Deleting a unit that is in use is refused, and the refusal names where it is used, table by field. Deactivate it instead: it leaves the pickers and every value already recorded in it stays readable.
The arithmetic: factors and converted values are decimal in the application and numeric(28,12) in the database, never binary floating point — 0.30000000000000004 in front of somebody is not a rounding style, it is a bug. A chained conversion runs at full precision and rounds once, at the point a person reads it. The imperial factors are the defined SI equivalences: an inch is 25.4 mm and a pound is 0.45359237 kg, so metric-to-imperial round trips are exact rather than approximately exact.

05The unit library

Every workspace starts with six classes and thirty-six units, so nobody begins at an empty table: mass (mg, g, kg, t, oz, lb), length (mm, cm, m, km, in, ft, yd, mi), area, volume (ml, l, m³, US and UK gallons), time, and count (each, pair, dozen, box, pallet).

RowFold's unit library showing the Mass class. Each row has a code, name, to-base factor, decimals, a rounding mode, whole-numbers-only and active checkboxes, an in-use count and a delete button.
Every unit is editable, and every column of it means something: the factor, how many decimals it shows, how it rounds, whether it allows fractions at all, and how many fields are relying on it right now.

Box and pallet ship at a factor of 1 on purpose — a pallet is however many your trade says it is, and guessing 48 would be inventing a fact about your business. Set it once and every column counting pallets follows. You can add units to a class and add classes of your own; a workspace that measures in reams, drums or linear feet is a settings change, not a support ticket.

06Changing a column's unit

Move a column from kilograms to grams and the stored values move with it — multiplied through exactly, once, inside the same save, with the confirmation telling you how many changed. It is the only configuration change in RowFold that rewrites records, and it does so because the alternative is worse: leaving the numbers alone would keep the same digits under a new label and silently restate every one of them by a factor of a thousand.

Changing to a unit in a different class is refused, for the reason in section 04 — there is no exact factor to apply. An empty column can be set to anything, because there is nothing to restate.

07What it does not do

Read this before you assume a case is covered. Everything above ships today. These do not, and we would rather you learn them here than after loading your data.
  • No temperature, and it is not an oversight. Conversion is a pure ratio, and °C to °F is not a ratio — it has an offset. Rather than special-case one class, RowFold does not offer temperature at all. The same goes for any other offset scale.
  • No per-record cross-class factor yet. “This product is 2.4 kg per metre” is exactly the fact that would make kilograms and metres convertible for that record, and there is nowhere to enter it today. Cross-class conversion is therefore always refused rather than sometimes possible.
  • A unit is not shown on a Lookup or Rollup of a quantity. The number is right — it is the same stored number — but a rollup of a kilograms column prints a bare total rather than one carrying kg.
  • Exports carry the number, not the unit. A CSV of a kilograms column contains 1.2, deliberately: a value with a unit glued on is not something a spreadsheet will sum. The column heading is where the unit belongs in a file.
  • One column, one unit. Values are converted on entry rather than stored in whatever they were typed in, so a column cannot hold genuinely mixed units. That is what makes totals trustworthy; it also means there is no per-row unit override.

Next: how money works — which looks similar and is deliberately built the opposite way round, because an exchange rate is not a conversion factor. Or read the docs.