Example: Managing units of measure
Example of managing units of measure.
Both kinds of records used to represent knowledge about measurements can be found by navigating to Tools > Administration > Unit of Measure (UOM). Clicking Types brings up a list of existing UOM types.
We will explain how to add a new kind of measurement and units of measure by working through an example. The kind of measurement will be Digital Data. The units of measure will be byte, kilobyte, megabyte, gigabyte, etc.
To add a new kind of measurement, click the Add action, which causes a UOM_Type form to appear.
Put the name of the kind of measurement in the field labeled UOM Type. This is the only field we need to fill in at this time.
UOM Type Code is a read-only field. It is used internally by IBM® Maximo® Real Estate and Facilities.
The Base UOM field will be filled in automatically when we create the first unit of measure for Digital Data. The unit of measure whose name appears in the Base UOM field is used to organize conversions between different units of measure.
SELECT * FROM uom_types a WHERE base_uom IS NOT NULL
AND base_uom != '' AND NOT EXISTS
(SELECT 'x' FROM uom_values b WHERE a.UOM_TYPE_CODE =
b.UOM_TYPE_CODE and a.base_uom = b.UOM_VALUE)One way to organize conversions between different units of measure is in a matrix as shown in the following table. This organization supplies a conversion factor to convert from every unit of measure to every other unit of measure.
| To Bytes | To Kilobytes | To Megabytes | To Gigabytes | |
|---|---|---|---|---|
| From Bytes | 1 | 0.0009765625 | 0.0000009536 7431640625 | 0.0000000009 3132257461 5478515625 |
| From Kilobytes | 1024 | 1 | 0.0009765625 | 0.0000009536 7431640625 |
| From Megabytes | 1048576 | 1024 | 1 | 0.0009765625 |
| From Gigabytes | 1073741824 | 1048576 | 1024 | 1 |
Using this matrix organization, to convert from one unit to another, find the correct conversion factor and multiply by it. For example, to convert from gigabytes to kilobytes, the table example tells us to multiply by 1048576.
The unfortunate thing about this organization is that it may require an unreasonably high number of conversion factors. The table example shows 4 units of measure and requires 16 conversion factors. This is not so bad, but it gets worse with more units. For example, 10 units require 100 conversion factors, whereas 25 units require 625 conversion factors!
To avoid needing so many conversion factors, IBM Maximo Real Estate and Facilities uses a different organization that requires only one column of the matrix. The unit of measure that corresponds to the matrix column we choose to use is called the base UOM.
Using this organization, conversion from one unit to another is done by first converting from the original unit of measure to the base UOM. Then the base UOM is converted to the target unit. The conversion from the base unit to the target unit is done by dividing by the conversion factor instead of multiplying. We will make this clearer by working through an example.
1048576 / 1024 = 1024
This works out the same as if we had set up the entire matrix, at the expense of needing an additional division.
In theory, given a set of units used to measure the same kind of thing, you could you pick any of the units to be the base UOM. Since every unit can be converted to every other unit, it should work no matter which unit you pick. However, it turns out that some units may be a better choice for base UOM than others.
The reason that some units of measure may be a better choice for base UOM than others has to do with the way IBM Maximo Real Estate and Facilities stores numbers. There is a limit to the size of number that it stores. IBM Maximo Real Estate and Facilities can store a number with up to 20 digits before the decimal point and up to 12 digits after the decimal point.
Because of the limitation on the sizes of numbers that IBM Maximo Real Estate and Facilities can store, choose a base UOM that allows all the conversion factors to be represented exactly. Looking at the conversion matrix in the same table example, we see that converting to megabytes or gigabytes involves conversion factors that have more than 12 digits next to the decimal point. This means that both megabytes and gigabytes would be bad choices for the base UOM because IBM Maximo Real Estate and Facilities would not be able to store all the digits of some of the conversion factors. The results of those conversions would not be correct.
The conversion factors for bytes and kilobytes do fit into what IBM Maximo Real Estate and Facilities can store. This makes either of them a good choice for base UOM.
- To do this, create a new UOM_Values record.
- To create a new UOM_Values record, navigate to Tools > Administration > Unit of Measure (UOM) > Values, and click the Add action.
- Set the value of the UOM Type field to Digital Data. The system completes the rest of the General section with information from the UOM_Type selected.
- Next, fill in fields of the UOM Details section, which describes information about the unit of measure.
- Enter the unit of measure's name in the UOM field and put the unit of measure's abbreviation in the UOM ABBREVIATION field.
- The default value for the Conversion Factor field is 1. The value of Conversion Factor for a base UOM should be 1.
- The rest of the fields are not relevant for Kilobytes, so we finish by clicking the Create action. Kilobytes becomes the base UOM for Digital Data because it is the first unit of measure defined for Digital Data.
- To complete the example, create UOM_Values records to describe bytes, megabytes, and gigabytes.
There are additional fields in the UOM_Values form that we did not use to define kilobytes. The first of this is Conversion Offset. The Conversion Offset field is used to specify a value that needs to be added before multiplying by the value of the Conversion Factor field.
⁰C = (⁰F - 32) x 5/9The record that describes degrees-fahrenheit is shown in the following figure.

The remaining fields are most often used with units of money (currency), but may be used for any kind of unit.
The value of the Display Mask field is used to determine how numbers with the unit of measure will be formatted when displayed. If no value is supplied for the Display Mask field, default formatting is used. The default formatting follows these rules:
- If a number is negative, it is formatted with a minus sign (-) at the beginning.
- The number will be formatted with no leading zeros, unless the magnitude of the number is less than 1. If the magnitude of the number is less than 1, then there will be one leading zero.
- If the number has a fractional part, it will be formatted with a decimal point followed by one or more digits.
- If a number has a fractional part, it will be formatted with only as many digits after the decimal point as are needed. It will have no trailing zeros.
- If a value has more digits after the decimal place than shown in the Display Mask property, the platform defaults to using ROUND_HALF_UP to round the value in the display.
- 0
- -2
- 34
- -0.234
- 0.234
- 123.4565
See Number formats for a description of the values to put in the Display Mask field to control the display formatting of numbers.
Storage Precision defines how many decimal places the platform is to use when computing and storing numbers defined with this UOM. Enter the number of digits next to the decimal point. The maximum value is 12.
- ROUND_CEILING
- Round the fractional digit so the value moves toward positive infinity. For example, if Storage Precision is 2, 1.234 => 1.24, 1.12 => 1.13, -1.234 => -1.23.
- ROUND_DOWN
- Round the fractional digit so the value moves toward zero. The operation effectively truncates the value at the number of decimal places in Storage Precision. For example, if Storage Precision is 2, 1.2345 => 1.23, 1.328 => 1.32, -2.125 => -2.12.
- ROUND_FLOOR
- Round the fractional digit so the value moves toward negative infinity. For example, if Storage Precision is 2, 1.234 => 1.23, 1.236 => 1.23, 1.235 => 1.23, -1.234 => -1.24.
- ROUND_HALF_DOWN
- Round the fractional digit based on the digit that follows it. If the next digit is 6 or greater, round up. If the next digit is 5 or less, round down. For example, if Storage Precision is 2, 1.234 => 1.23, 1.236 => 1.24, 1.235 => 1.23, 1.23 => 1.23.
- ROUND_HALF_EVEN
- Round the fractional digit up or down as needed to make it even. For example, if Storage Precision is 2, 1.234 => 1.23, 1.236 => 1.24, 1.235 => 1.24, 1.245 => 1.24, 1.23 => 1.23.
- ROUND_HALF_UP
- Round the fractional digit based on the digit that follows it. If the next digit is 5 or greater, round up. If the next digit is 4 or less, round down. For example, if Storage Precision is 2, 1.234 => 1.23, 1.236 => 1.24, 1.235 => 1.24, 1.23 => 1.23.
- ROUND _UP
- Round the fractional digit so the value moves away from zero. For example, if Storage Precision is 2, 1.234 => 1.24, 1.23 => 1.23, -1.234 => -1.24.
The UOM Decimal field controls the formatting of numbers that contain a decimal point. If no value is in the UOM Decimal field, a period (.) will be used to indicate a decimal point. If a value is in the UOM Decimal field, that value is used as the decimal point. This is useful for formatting numbers for countries that use a comma (,) as a decimal point.
The value of the Currency Symbol field is not used in the Maximo Real Estate and Facilities. If the value of the Display Mask field specifies that numbers should be formatted with a currency symbol, it will always use a dollar sign ($) for the currency symbol.
The value in the Display Mask field may indicate that the digits of a number should be separated in to groups like this: 123,456,789. If no value is specified in the UOM Delimiter field, the character used to separate groups of digits is a comma (,). If a value is specified in the UOM Delimiter field, that value is used instead of a comma to separate groups of digits. This is useful for formatting numbers for countries that use a period (.) or a space to separate groups of digits.