Page:1

# TOPIC:

## Basic Calculations / Transformations 4 years 5 months ago #14878

 Ivey Topic Author Offline Fresh Boarder Posts: 4 Thank you received: 1 I understand the Advanced ETL can perform calculations, I'm wondering if this can performed on Visual Importer? and does it use the same scripting language? Please Log in or Create an account to join the conversation.

## Basic Calculations / Transformations 4 years 5 months ago #14879

 KevinJohn Offline Expert Boarder Posts: 87 Karma: 9 Thank you received: 15 Hi Ivey, Visual Importer ETL is capable of performing certain calculations particularly during import. Basic Calculations can be performed by setting the mapping type to calculation and type constant or formula into calculation edit box. An expression editor should also be able to assist you in performing more complicated expression and computations. Further Reading: Please Log in or Create an account to join the conversation.

## Basic Calculations / Transformations 4 years 5 months ago #14883

 Ivey Topic Author Offline Fresh Boarder Posts: 4 Thank you received: 1 Do you have any example on how to perform simple calculations and some for formatting (example: 100 to 100 USD) The following user(s) said Thank You: KevinJohn Please Log in or Create an account to join the conversation.

## Basic Calculations / Transformations 4 years 5 months ago #14884

 KevinJohn Offline Expert Boarder Posts: 87 Karma: 9 Thank you received: 15 Simple calculations can be performed by the following syntax When multiplying fields: StrToFloat([INTEGER_F]) * StrToFloat( [FLOAT_F]) When adding USD to the Integer variable [INTEGER_F] + "USD“ and expression that require conditional statement we can have if(StrToFloat([FLOAT_F])> StrToFloat([INTEGER_F]),1,2) Trim('[CHAR_F]') Please Log in or Create an account to join the conversation.

## Basic Calculations / Transformations 4 years 5 months ago #14970

 KevinJohn Offline Expert Boarder Posts: 87 Karma: 9 Thank you received: 15 Here are some of the BEST Examples of making Calculations For fields that require numeric values it is best to convert such from String to Float The following pattern should avoid problems with data quality. Create variables for every input parameter Assign input parameters to variables inside "try expect" block Perform calculations Return value Example:Var vIncome: Float; vExpenditure: Float; begin // Converting strings to Floats Try vIncome:=Income; except vIncome:=0; end; try vExpenditure:=Expenditure; except vExpenditure:=0; end; // Calculation Result := vIncome-vExpenditure; end; . Please Log in or Create an account to join the conversation.
 Page:1

We have 160 guests and no members online