Skip to main content

Dear community,

I have a table with two records for which I want to get only the record where _min in row 2 is less compared to _min in row 1 (or using _max). Hence, for the table below I want to get the second row and all attributes from that row.

 

Any ideas?

 

FME Group Based Computation

Hi @lambertus​ 

I have a couple of options for you, and a sample workspace:

(1) if you want to compare record 2 against record 1 (the previous) there is an advanced option in the AttributeManager transformer that means you can access values from adjacent features - this is method 1 in the attached workspace. Expose the _min value from the previous record and then use a Tester to compare the 2 values.

(2) if you want to get the lowest value from a group of records (with the same _edge_id value) then you can use the StatisticsCalculator to get the minimum of the _min value, grouping by _edge_id. The complete port outputs the original data with the calculation added. Then use a Tester again to compare the 2 values.

get_lowest_valueI think the second option is the one you need based on your question title.

Hope that resolves it for you


Thanks @1spatialmary​! Works perfect.


Reply