how to get the max value out of 6 fields from row in excel file
Hallo, I have an excel file that contains 5000 rows with data about customers and each row contains the turnover from six years for each customer now I want to get the highest turnover out of this six years for each customer. Which component should I use and how do I get the max? Greetings
I use tFileInputExcel -> tMap to filter not needed values and from tMap -> tJavaRow -> tMap to splitt the result to different files.
I think with tJavaRow I could get the max value out of the six columns and fill a new column (maxValue)
I`m not a Java Junky so hope someone can help me get the right code, I found this:
double[] myArray={field1, field2, field3, field4, field5, field6};
double max;
max = myArray;
for (int i =1; i < myArray.length; i++)
{
if (myArray
> max) max = myArray; } row1.maxValue=max; Is this a simple way or is there another solution in Talend?