Skip to content
  • There are no suggestions because the search field is empty.

Unit-Aware Formulas & Using Percentages

Mapistry’s formulas are unit-aware. The formula builder knows the units you specified when you created your Log fields and Resource property fields during setup. When you type your formula, Mapistry will automatically display your formula’s output unit in the grayed-out box to the right of your formula. 

When working with constants, always include units in-line. This will ensure your calculation outputs the desired units.   

You can type in constants with units directly. For example:

blobid10

Here's an example where a unit-aware formula, HEAD_FT, won't proceed - because the constant does not have a unit.  Screenshot 2024-08-23 at 2.41.38 PM

Appending "ft" fixes the error and you can proceed with further calculations.  

Screenshot 2024-08-23 at 2.42.56 PM

Here’s an example of the formula builder automatically determining the output units of the formula from the Log and Resource fields used.

blobid1

 

To change the output units of your formula, simply type “to new unit” (for example, “to grams”) at the end of your formula and see the output unit update. 

blobid2

 

Mapistry’s formula builder will only allow you to convert between compatible units. For example, you could not use this function to convert a length unit of measure into a volume unit (without applying a conversion factor).

blobid3

 

Options for Creating Formula Calculations Using Percentages (%)

Percent (%) is NOT a unit available to choose from for numeric fields in Logs and Resources. Percent operators must be applied to formulas to operate as a percent. Adding the “%” symbol to a formula will divide the result by 100. 

Therefore, when you use a value that is a percent in a formula, this is the recommended option:

  • Convert the value from a percent to its decimal equivalent (divide by 100) prior to using it in the formula (ex: the resource property field and/or log field values would be formatted as the decimal equivalent, with the percentage value already converted to a decimal). This is recommended so you don’t need to remember to take the extra step to apply the % sign to the formula in the formula setup stage.

For example, I have a Paint Usage Log where I track each paint’s usage in pounds. I need to calculate the amount of Toluene emitted in pounds. For each paint, I know the weight percent Toluene composition (ex: Paint A has a Toluene Content Weight Percent of 0.1%). There will be a Paint Resource with a resource property for Toluene Content that can be defined for each paint. The Paint Usage Log will have Log fields for Paint Used and Amount Used, where Paint Used is a Resource field to pick from the list of paints, and Amount Used will be a number field with pounds as the default units.

 To calculate the amount of Toluene emitted in pounds:

Use decimal equivalent (Recommended)

  • The Resource for Paints will have a resource property for Toluene Content where the weight % value is converted to a decimal

    - The Toluene Content resource property will represent the portion or fraction of toluene, where the value is already divided by 100. 

    - The Toluene Content resource property could be named “Toluene Content - Decimal” and would remain unitless. The value of Toluene Content - Decimal for Paint A would be 0.1/100 = 0.001.

blobid4
blobid5

  • In the Paint Usage Log, the formula field to calculate Toluene Emissions (lbs) would be Amount Used (lbs) * Toluene Content Fraction.

    - The % symbol should not be applied to the formula because the Toluene Content value has already been divided by 100.

 

End of Article

Support

If you have any questions or need further assistance, please e-mail help@mapistry.com or call (510) 313-1422.