Skip to main content
Question

calculate running total based on variable time grouping

  • November 16, 2017
  • 2 replies
  • 27 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.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

2 replies

erik_jan
Contributor
Forum|alt.badge.img+26
  • 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