Question

How to group date according to date ranges?

  • 21 July 2021
  • 4 replies
  • 19 views

Badge

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

Userlevel 4
Badge +30

Hi @ppp19​ 

 

Your source data is not here.

Badge

Hi @danilo_fme​ 

Attached snapshot from my data!

Badge +20

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

Badge

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

Reply