Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello
I need to split a file into many many many files in order to do what I want to do.
I have an input file which looks like this
It covers the last 30 years.
Let's say I want to have a file which gives me the best 2 sellers for each year over the last 30 years.
My idea is to split the into file into 30 files (one fiche for each year.
Then for each file, I can sort them and selec the best two.
Then I can unite them in one file.
If apply this idea, i have o use "tReplicate" 30 times.
If my input file cover the last 50 years, it won't work
How can I do to selectthe best 2 sellersof each year?
Is there another way?
Hi,
Yes, you'll need to use the tFlowToIterate component. Broadly:
tFileInputExcel -> tUniqRow (get unique years) -> tFlowToIterate ->
tFileInputExcel -> tFilterRow (get all rows for given year) -> tSortRow (order by # sales) -> tFilterRow (advanced flter - only get top 2 sellers) -> tFileoutputExcel
Thanks
David
If you find these answers helpful, don't forget to Like and/or set as the answer
hello,
thank you, it almost work.
I wasn't able to perform this task:
tFilterRow (advanced flter - only get top 2 sellers)
how do you write the expression to the top 2 sellers?
Do you need to write in java?