Skip to main content
Solved

Filter by most recent date


mr_fme
Enthusiast
Forum|alt.badge.img+8

Hi,

 

I have a table that has 2 fields, one with the name of cities and the other with the date. Features with the name of the same city are repeated, but the dates do not. How can I make a filter to use only each city but with the most recent date?

Eg. 

City | Date

DC     20200621

WD    20200619

DC     20200620

DC     20200619

WD    20200618

 

Thank´s

Best answer by erik_jan

Another option:

Use Sorter to sort by City, then by Date (descending).

Then use a Sampler to sample only the first feature (Group by City).

That should give the wanted result.

View original
Did this help you find an answer to your question?

3 replies

takashi
Contributor
Forum|alt.badge.img+19
  • Contributor
  • June 22, 2020

Hi @mr_fme, a possible way is: sort the features by Date descending with the Sorter, keep the first feature for each City with the DuplicateFilter.


erik_jan
Contributor
Forum|alt.badge.img+17
  • Contributor
  • Best Answer
  • June 22, 2020

Another option:

Use Sorter to sort by City, then by Date (descending).

Then use a Sampler to sample only the first feature (Group by City).

That should give the wanted result.


mr_fme
Enthusiast
Forum|alt.badge.img+8
  • Author
  • Enthusiast
  • June 22, 2020

Thank´s


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings