xflow Help

Simple Calculation

The Simple Calculation node enables users to define and name new calculated columns using various arithmetic and mathematical operations within a data workflow.

Configuration

Upon selecting the Simple Calculation node, users are presented with the following configuration options along with a condition opened by default.

Defining and Naming New Calculated Columns

Users can define and name new calculated columns by following these steps:

New Calculation Column: By default, a condition is opened. Additional steps can be added by clicking '+New Calculation Column'.

Select Operator: Choose from a dropdown menu of operators:

  • Addition (+)

  • Subtraction (-)

  • Multiplication (*)

  • Division (/)

  • Percentage (%)

  • Ceil (round up to the nearest integer)

  • Floor (round down to the nearest integer)

  • ABS (absolute value)

Select Column: After selecting an operator, choose the column from the dropdown menu to apply the operator.

Formula Builder

Formula Builder displays the defined calculations, showing how operations and columns are combined to generate new calculated values. It also indicates whether the formula is validated or if it is incomplete or invalid.

Example Usage

Consider a dataset containing employee information:

Dataset

EmployeeID

EmployeeName

Salary

Bonus

1

John Doe

5000

10%

2

Jane Smith

6000

8%

3

Michael Johnson

4500

12%

4

Emily Brown

5500

15%

Problem Statement: We need to calculate the TotalIncome for each employee, including bonuses based on their salary and bonus percentage.

Step 1: Calculate Bonus Amount

  • Select Operator: Choose 'Multiplication' to calculate the bonus amount.

  • Select Column: Multiply Salary by Bonus to apply the bonus percentage.

Step 2: Calculate Total Income

  • Add New Step: Click '+Add New Step' to define a new calculation.

  • Select Operator: Choose 'Addition' to calculate the total income.

  • Select Column: Add Salary with BonusAmount to calculate TotalIncome.

Formula Builder

TotalIncome ((Salary* Bonus Value )+Salary)

Resultant Output

EmployeeID

EmployeeName

Salary

Bonus

TotalIncome

1

John Doe

5000

0.1

5500

2

Jane Smith

6000

0.08

6480

3

Michael Johnson

4500

0.12

5040

4

Emily Brown

5500

0.15

6325

Last modified: 21 February 2025