Skip to main content

Hi there,

 

I got crime data along with the date field. Now I want to calculate the Monthly average of crime data. For instance, Crime data for Janaury 2018, January 2019, and so on. Could anyone guide me how to do in FME?

Convert the date to a month attribute using the DateTimeConverter transformer.

Then use the Statisticscalculator transformer to do the math (group by the month attribute).

Hope this helps.


Convert the date to a month attribute using the DateTimeConverter transformer.

Then use the Statisticscalculator transformer to do the math (group by the month attribute).

Hope this helps.

If I want to calculate the monthly average over the last 5 years, would the same method be used to get the result?


If I want to calculate the monthly average over the last 5 years, would the same method be used to get the result?

The described method will get you the monthly average for all the months that are in the data.

If the data goes back more than 5 years, you can limit that by using a Tester (testing that the date is larger than Feb 4, 2015).


Reply