***************************************************** ***************************************************** ***************************************************** ***************************************************** ***************************************************** ********************** WARNING ********************** ********************** WARNING ********************** ********************** WARNING ********************** ********************** WARNING ********************** ********************** WARNING ********************** ********************** WARNING ********************** ********************** WARNING ********************** ********************** WARNING ********************** ********************** WARNING ********************** ********************** WARNING ********************** This Confluence article was automatically generated from Asciidoc. Any changes you make to this document will be overridden! If you want to change the content, consider leaving a comment. You can edit the content directly here: https://gitlab.pricefx.eu/training/pricefx-knowledge-base/-/tree/dev/public/content/docs/walkthroughs/analyzer/data-mart-uom-setup ***************************************************** ***************************************************** ***************************************************** ***************************************************** ***************************************************** ********************** WARNING ********************** ********************** WARNING ********************** ********************** WARNING ********************** ********************** WARNING ********************** ********************** WARNING ********************** ********************** WARNING ********************** ********************** WARNING ********************** ********************** WARNING ********************** ********************** WARNING ********************** ********************** WARNING **********************

Setup of an automatic unit of measure (UOM) conversion in a Datamart consists of several steps.

Fields for Unit of Measure and Quantity

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

Add a field of the 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 Data Source, 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.

data mart with uom fields

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

data source with uom fields

Set up uom Data Source

Upload data into an uom Data Source. For details see the uom DataSource.

Test Conversion

Compare the data uploaded to the Datamart (or Data Source if the data comes from a Data Source).

Note that if you would be looking at the Datamart data in the 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 simply makes 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 it and understand what happens during Datamart querying.

data source with uom data data mart with uom data