xflow Help

Advance Calculation

The Advanced Calculation node allows users to define conditions and perform complex computations using a formula builder. This node facilitates the creation of new columns based on specified conditions, enhancing data analysis capabilities.

Configuration

Upon selecting the Advanced Calculation node, users are presented with the following options:

Defining and Naming New Calculated Columns

A new column is automatically generated to define calculation conditions, with the option to edit its name as needed. The user interface conveniently displays all dataset columns and includes a search feature, enabling effortless integration into the formula builder.

Formula Integration and Validation

Users can effortlessly integrate dataset columns into calculations simply by selecting them within the formula builder interface.

Validation Process: Validation at the bottom of the builder ensures accuracy in formula creation:

  • Validated: Proceed with the defined formula confidently.

  • Error: Indicates issues within the formula that need correction before proceeding.

Adding New Conditions

To define new conditions, users can utilize the + Add New Calculation button, facilitating iterative refinement of analytical criteria.

Supported Operators:

The Advanced Calculation node currently supports basic arithmetic operators (+, -, *, /).

Example Usage

Problem Statement: Let's consider a scenario where we need to calculate the new salary for each employee after applying a 5% salary hike and determine the years of service for each employee based on their age.

Dataset

Employee ID

Name

Age

Department

Salary

101

Alice

30

HR

60000

102

Bob

28

IT

55000

103

Charlie

35

Marketing

70000

104

David

32

Finance

62000

105

Emily

27

Operations

58000

106

Frank

31

HR

62000

107

Grace

29

Finance

54000

108

Henry

33

IT

64000

109

Irene

26

Marketing

56000

110

Jack

34

Operations

61000

Calculate New Salary with 5% Hike

  • Column Name: New Salary

  • For each employee, multiply their current salary by 1.05 to calculate the new salary after a 5% increase.

    [Salary]*1.05

Resultant Output

Employee ID

Name

Age

Department

Salary

New Salary

101

Alice

30

HR

60000

63000

102

Bob

28

IT

55000

57750

103

Charlie

35

Marketing

70000

73500

104

David

32

Finance

62000

65100

105

Emily

27

Operations

58000

60900

106

Frank

31

HR

62000

65100

107

Grace

29

Finance

54000

56700

108

Henry

33

IT

64000

67200

109

Irene

26

Marketing

56000

58800

110

Jack

34

Operations

61000

64050

Determine Service Years

To calculate the service years for each employee, subtract their age from the assumed retirement age. In India, let's assume retirement age is 60 years.

  • Column Name: Service Years

  • Subtract the employee's age from 60 to get the service years.

    60 - [Age]

ResultantOutput

Employee ID

Name

Age

Department

Salary

Service Years

101

Alice

30

HR

60000

30

102

Bob

28

IT

55000

32

103

Charlie

35

Marketing

70000

25

104

David

32

Finance

62000

28

105

Emily

27

Operations

58000

33

106

Frank

31

HR

62000

29

107

Grace

29

Finance

54000

31

108

Henry

33

IT

64000

27

109

Irene

26

Marketing

56000

34

110

Jack

34

Operations

61000

26

Last modified: 21 February 2025