Jump to content

Average over sets of consecutive periods of time.


Luke S

Recommended Posts

Hello

I want to creat a calculated column which calculates an average over a time frame. The time frame gets larger as the data set progresses. i.e. I want to include the previous time point in the next average.

e.g.

 

Temperature

Time / Days

Time Point

Average Temperature (the column I want to calculate)25.1

1

TP1

25.2

25.2

2

TP1

25.2

25.3

3

TP1

25.2

25.4

4

TP2

25.35

25.5

5

TP2

25.35

25.6

6

TP2

25.35

25.7

7

TP3

25.5

25.8

8

TP3

25.5

25.9

9

TP3

25.5

So the average for 'TP3' should be the average of all the data, not just data at 'TP3'. The average for TP2 should include all data from TP1 and TP2.

I've tried the following:

case

when [Time Point]='TP1' then If([Time / Days]

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...