Is it possible to reference a *cell* in a calculated field of access?
I want to add a column that takes the average of the "price" column, if the "product ID" column matches the "product ID" of that row, and the "date" column is less than the date in that row.
[TABLE="width: 523"]
<tbody>[TR]
[TD]No.
[/TD]
[TD]Product ID
[/TD]
[TD]Date
[/TD]
[TD]Price
[/TD]
[TD]*12-month Avg - Prior to this Purchase*
[/TD]
[TD]Calculation
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]A
[/TD]
[TD]1/1/2016
[/TD]
[TD] 10
[/TD]
[TD][/TD]
[TD]= 0
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]A
[/TD]
[TD]5/30/2016
[/TD]
[TD] 20
[/TD]
[TD]10
[/TD]
[TD]=AVG(1)
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]A
[/TD]
[TD]10/27/2016
[/TD]
[TD] 30
[/TD]
[TD]15
[/TD]
[TD]=AVG(2, 3)
[/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]A
[/TD]
[TD]3/26/2017
[/TD]
[TD] 40
[/TD]
[TD]25
[/TD]
[TD]=AVG(3, 4)
[/TD]
[/TR]
</tbody>[/TABLE]
I want to add a column that takes the average of the "price" column, if the "product ID" column matches the "product ID" of that row, and the "date" column is less than the date in that row.
[TABLE="width: 523"]
<tbody>[TR]
[TD]No.
[/TD]
[TD]Product ID
[/TD]
[TD]Date
[/TD]
[TD]Price
[/TD]
[TD]*12-month Avg - Prior to this Purchase*
[/TD]
[TD]Calculation
[/TD]
[/TR]
[TR]
[TD]1
[/TD]
[TD]A
[/TD]
[TD]1/1/2016
[/TD]
[TD] 10
[/TD]
[TD][/TD]
[TD]= 0
[/TD]
[/TR]
[TR]
[TD]2
[/TD]
[TD]A
[/TD]
[TD]5/30/2016
[/TD]
[TD] 20
[/TD]
[TD]10
[/TD]
[TD]=AVG(1)
[/TD]
[/TR]
[TR]
[TD]3
[/TD]
[TD]A
[/TD]
[TD]10/27/2016
[/TD]
[TD] 30
[/TD]
[TD]15
[/TD]
[TD]=AVG(2, 3)
[/TD]
[/TR]
[TR]
[TD]4
[/TD]
[TD]A
[/TD]
[TD]3/26/2017
[/TD]
[TD] 40
[/TD]
[TD]25
[/TD]
[TD]=AVG(3, 4)
[/TD]
[/TR]
</tbody>[/TABLE]
Last edited: