Skip to main content
Question

calculate running total based on variable time grouping

  • November 16, 2017
  • 2 replies
  • 13 views

Forum|alt.badge.img

i am new to FME and i am trying to find a way to calculate a running total for a large set of gauge data. I have a point with 24 hours of data, and i would like to sum a running total based on: 3 hours; 6 hours; 9 hours, 12 hours, etc.... for each point. i tried the statistics calculator but that gave me a running total of all the records. i would like them group by 3's, 6's, 12's, etc. any assistance would be appreciated.

2 replies

erik_jan
Contributor
Forum|alt.badge.img+18
  • Contributor
  • November 16, 2017

You will need to create a TimeGroup attribute (conditional value: if hour in 1,2,3 then 3 elsif hour in 4,5,6 then 6 etc) in an AttributeCreator transformer.

Then you can use that attribute in the Group by of the StatisticsCalculator to calculate the running total per TimeGroup (and any other attribute you already had).


Forum|alt.badge.img
  • Author
  • February 1, 2018

what i am looking for will be a sliding scale running total. there are appx 170 records per point, each record is a 1-hour value. sum(2:3); sum(3:4); sum(4:5), etc ...... sum(167:170). this is needed for several increments: 3 hour, 6 hour, 12 hour, 24 hour, 72 hour


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