Skip to main content
Question

How to group date according to date ranges?


Forum|alt.badge.img

Hi,

I want to group materials and pipe length according to different age barckets (of say 2 or 5 or 10 years)...how could i do in FME?

Please see my sample data:



4 replies

danilo_fme
Evangelist
Forum|alt.badge.img+41
  • Evangelist
  • July 21, 2021

Hi @ppp19​ 

 

Your source data is not here.


Forum|alt.badge.img
  • Author
  • July 21, 2021

Hi @danilo_fme​ 

Attached snapshot from my data!


caracadrian
Contributor
Forum|alt.badge.img+22
  • Contributor
  • July 22, 2021

If you want to group by year you should first extract the value of the year.

Use DateTimeConverter set with Input Format %d/%m/%Y and Output Fomat %Y.

Than use AttributeRangeMapper. Use the Generate button to auto-create your ranges (input a min, max year and the number of ranges - do the math for 2, 5, 10 years).

Use the value of the range attribute (_looked_up by default) to group features


Forum|alt.badge.img
  • Author
  • July 27, 2021
caracadrian wrote:

If you want to group by year you should first extract the value of the year.

Use DateTimeConverter set with Input Format %d/%m/%Y and Output Fomat %Y.

Than use AttributeRangeMapper. Use the Generate button to auto-create your ranges (input a min, max year and the number of ranges - do the math for 2, 5, 10 years).

Use the value of the range attribute (_looked_up by default) to group features

Hi @caracadrian,

That worked perfectly according to my expectations. Thank you so much for your help.

Regards


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