Set up Unit of Measure Conversion in Datamart

To set up automatic Unit of Measure conversion in Datamart, you need to setup several things. This article describes the steps.

Fields for Unit of Measure and Quantity

Add a field with type Quantity, and set its Funtion property to Per Unit Basis. This is quantity of the product sold (measured in units stored in UOM field). The UomConversionFactor (from datasource uom) will be applied to this value. This field can either come from a DataSource, or can be directly created in the Datamart.

Add a field of type UOM into the Datamart. This field contains the UOM of the quantity of the row. Together with quantity they represent the amount of product sold. This field can either come from a DataSource, or can be directly created in the Datamart.

Fill in the Base UOM in the Datamart Settings. This will represent the UOM, into which quantity of every row will be converted.

Figure 1. Example of a Datamart settings of Quantity and UOM fields

If the UOM and Quantity fields are taken from a DataSource, then ensure, that they are also set up properly in the DataSource.

Figure 2. Example of a DataSource settings of Quantity and UOM fields

Set up the uom DataSource

Upload data into datasource uom. For details, see the uom DataSource

Test the Conversion

Compare the data uploaded to Datamart (or Datasource, if the data are coming from the DataSource)

Note, that if you would be looking at the Datamart data in user interface (e.g. page with Detail of a Datamart, tab Data), some conversions are already done (multiplication of money by quantity), as the page is simply making a non-aggregated query to the Datamart to show you the data.

In the sample below, we intentionally selected some rows in a base currency and some in non-base, and then some rows in base uom and some with non-base uom, so that you can compare and understand, what’s happening during the query to the datamart.

Figure 3. Sample of data in the original DataSource
Figure 4. Sample of Datamart query (via Table chart) to verify the automatic conversion in a Datamart.