Units

Expressions may include unit sub-expressions which are made from unit identifiers and operators. Operators include *, /, and ^ (raise to power).

Unit sub expressions

Unit sub-expressions may follow a numeric literal or an identifier enclosed in square or curly brackets. For compound units, the expression must be enclosed in brackets. For example:

=2kg
=4.5(g/t)
=[TF](m3/kg)		

Unit expression can also be attached to an expression in round brackets. For example:

(2+3)(m3/kg)
[LENGTH]+[WIDTH])ft	

Unit derivation rules

When working out the result unit of an expression, a general rule of thumb is that the unit of the left operand influences the result.

Multiplication/Division

Operand units are multiplied and promoted to a higher-order unit if appropriate. For example, a product of two linear dimensions will be propagated to area, but a product of a linear dimension and a mass would not be promoted and remains as a product.

Addition/Subtraction

The right operand is measured in the unit of the left operand.

Raise to power

Raising measured values to power (^) is not allowed (mainly because it is unclear how to derive the unit of the result. While it is obvious that:

([X]m)^2		

is equivalent to

[X]m * [X]m		

and the result is m 2, the following expression is complicated:

([X]m)^[Y]	

Examples:

Some examples to demonstrate how the rules outlined above influence the result:

=2m+3

is 5m.

=6m * 7km

is 42000m 2, however:

=7km*6m

is 0.042km 2.

Unit Conversion

To convert between different units, attach a new unit to the expression. For example:

=(2m)ft		

Conversions between complex units are supported, too:

=(30kg*m)(lb*ft)
=([AREA]ac*ft)m3	

If the conversion is impossible, an error is reported.

Another example:

=([LENGTH]m + [WIDTH]ft)(yd)		

Conversions from and to a scalar are allowed. For addition/subtraction operators, the right operand is measured in left operand units. In the example above, [WIDTH] is treated as in feet if not measured, and converted to feet otherwise.

Unit Categories

In the Functions pane of the Expression Editor, the following categories of units are provided:

Expand a category to select the units you want to apply to the numeric values in your expression:

Length

Area

Volume

Mass

Proportions

Energy

Density

Specific Energy

Grade

Currency

Timespan

Scalar

QUANTITY

Unit Promotions

mm * mm = mm2
cm * cm = cm2
m * m = m2
km * km = km2
in * in = in2
ft * ft = ft2
yd * yd = yd2
mi * mi = mi2
mm² * mm = mm3
cm² * cm = cm3
m² * m = m3
km² * km = km3
ft² * ft = ft3

Unit Scales

1 _1 = 1000000.0 * ppm
1 _1 = 100 * pct
1 _1 = 1.0 * factor
1 mm = 0.001 * m
1 mm = 0.1 * cm
1 km = 1000 * m
1 ft = 12 * in
1 yd = 3 * ft
1 mi = 5280 * ft
1 in = 25.4 * mm
1 g = 1000 * mg
1 kg = 1000 * g
1 ct = 200 * mg
1 kg = 0.001 * t
1 Mt = 1000000 * t
1 lb = 7000 * gr
1 lb = 16 * oz
1 oz = 18.229166666666666666666666666667 * dwt
1 shtn = 2000 * lb
1 ltn = 2240 * lb
1 ozt = 480 * gr
1 lbt = 5760 * gr
1 lb = 0.45359237 * kg
1 ha = 10000 * m2
1 ac = 43560 * ft2
1 kJ = 1000 * J
1 MJ = 1000000 * J
1 kcal = 1000 * cal
1 cal = 4.184 * J
1 Btu = 1055.06 * J
1 kWh = 1000 * Wh
1 MWh = 1000000 * Wh
1 Wh = 3600 * J