Documentation

Cross Datasource Metric

 

 

In datapine, you can easily create customized fields from multiple data sources. Let’s assume you have a table containing your product prices and a second one containing the amount of products sold. By using the metric builder you can easily create a metric such as your approximate revenue.

 

Before building cross datasource metrics, make sure your data sources are linked to each other by using Foreign Keys. For more information on how to join two data sources, please click here.

 

 

  1. In the Chart Creator open the field builder with a click on ADD CALCULATED FIELD on the bottom of the data source list and assign a name to your metric.
  2. To create a cross-database metric simply drag and drop the desired fields from your data sources on the left into the Formula editor and add mathematical calculations to your field. In the example below we’ve added a multiplication of these two fields.
  3. Optionally, you can use a function from the Functions section. Here we’ve decided to take the count of sold products (ProductID) and the average product unit price (Unit_price).
  4. Save your metric as a new field by creating a folder or selecting an existing folder from the dropdown menu and then click on Save.

How to create a calculate field from more than one data source