Function block to get the average of a numeric variable over time