How big is your dataset? One fairly inefficient way is to merge on Attribute1 but allow duplicate suppliers and build a list. Then explode the list and test for the abs difference between the mileage values and sort by this difference followed by a duplicate filter to keep only the match with the smallest difference.
@richard_che Perhaps try AttributeRangeMapper to create discrete values for your closest mileage and add that as a key to your FeatureMerger, or you could try NeighborFinder and Group By Attribute1
Hi @ebygomm , thanks for your sharing your thoughts. I am new to FME and I am in a similar scenario as OP. It would be helpful if you can explain your answer in a bit more detail as I am unsure of how to implement it.
Here is a bit more detail about my problem:
I have rows of data with columns
- enter/exit time and
- license plate
I want to combine the rows so that there are rows of three columns:
- enter time
- exit time
- license plate
For each license plate and enter time, I want it to choose the closest exit time which comes after the enter time.
Below is the image of the feature merger settings as well as the output from the feature merger to an excel sheet.