Create Customized Fields



With the possibility to build customized fields you can easily expand your database and add complex calculations from one, two or more fields from your database. A customized field is treated like any other field in datapine. You can easily create charts and graphs by using these metrics in combination with other fields from your data sources.


In the following we will demonstrate how to set up customized fields and custom column in datapine using the Field Builder in the Chart Creator.



1. You can find the customized Field Builder in the Analyzer Section of datapine. When you want to add a field click on the button ADD CALCULATED FIELD at the left bottom corner of your screen.


2. First add a name to describe the metric that you plan to build. To add fields from your database into the Formula editor simply drag and drop them from the schema of your data sources on the left.


Please note: In order for datapine to create a link between the text in the Formula editor and the fields from your data source the text referring to a field has to have a specific format. Therefore, it’s always the safer option to use drag and drop instead of typing the field names into the Formula editor. If there are any typos or the like datapine won’t be able to link the field from your data source to the customized field.


3. Now you can add some mathematical calculation like Addition (+) or Multiplication (*).


4. Optionally, you can also use one of the functions available from the Functions section. Just double click or drag and drop the desired function into the Formula editor and complete with fields from a data source.


5. Once your formula is complete you can save your metric as a new field by creating a folder or selecting an existing folder from the dropdown menu and finally Save it.


How to create a customized field in datapine




Useful tips:


  • In the metric builder, we use a dot as a decimal separator

  • You can’t save a field with an incomplete formula. Please check if all brackets are closed and all parameters of the used functions are given correctly.
  • After you’ve clicked on a function from the Functions section, you will see a short description of the function as well as all parameters needed and a short example on how to use it.
  • You can preset an aggregation type for a field, by using one of the aggregation functions from the Functions section, e.g. SUM. Please note, when presetting a aggregation type you won’t be able to change the aggregation when building a chart with your new field.