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.
If the UOM and Quantity fields are taken from a DataSource, then ensure, that they are also set up properly in the DataSource.
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.