Create Calculated Field

<< Click to Display Table of Contents >>

Current:  Create Data Set > Self-Service Data Set > Data Governance 

Create Calculated Field

Previous pageReturn to chapter overviewNext page

In the editing interface of the data set, the user creates a new Calculated Field. The scope is the current data set. All dashboards that use the data set can use the Calculated Field. On the metadata area interface, right-click and select Create Calculated Field. By default, the selected column in the More menu is used as the Calculated Field function. You can input the function language to return the field content. The calculation type defaults to the basic function. After creation, the field would be put under the Dimension or Measure folder automatically. If you want to change the field type, you can move it to the Dimension node or the Measure node by drag-and-drop.

 

Editing interface

In the metadata area, users can create their own data segments, which exist only in the current data set and do not exist in other data sets of the same type. In the metadata area, click the More button after the field and select New Calculated Field to open the Calculated Field dialog box.

Calculated1

 

 

 

Detailed introduction

In the dialog box that opens, the user can enter a Calculated Field function in the blank area of the figure below to create a data field. When creating a data segment in a dataset, you can call various functions provided under the DateTime, Text, Math,Type conversion, Logic folders. For a detailed introduction to functions, see the Calculated Field Function List

Calculated2

 

[Name] Set the name of the data segment.

[Calculation type] Set whether to use Yonghong's Calculated Field function or SQL statement to create a Calculated Field

 

Application examples

If there is a sales data segment in the metadata area, as shown below.

Calculated3

 

When the user needs to add 1000 to each piece of data in the sales field, you can create a new field by creating a new Calculated Field. Assuming the name is sales2, just click the sales column, and then add +1000 to the back. The function content is col [ 'sales'] + 1000;

As shown below:

 

Calculated4

 

The sales2 field is generated under the measure node, as shown in the following figure.

Calculated5