Hi,
I was wondering how this would be possible. I come across this kind of problem very often so finding a solution would be amazing!!
I need to subtract the second row from the first row for each well in my access query.
I have data with three fields.
[Name]
[Surface]
[Depth]
This is the table I have
<tbody>
</tbody>
What I need: I need to subtract the second row [Depth] from the first row [Depth] for each well in [Name]
As you see below I call this field [Thickness] =SecondRow[Depth]-FirstRow[Depth]
I also drop the row which has last or Max [Depth] for each well in [Name] because I am calculating the thickness and keeping the final row would be redundant.
(this part can be left out if it is too complicated)
<tbody>
</tbody>
Any help is greatly appreciated!
Thanks!
I was wondering how this would be possible. I come across this kind of problem very often so finding a solution would be amazing!!
I need to subtract the second row from the first row for each well in my access query.
I have data with three fields.
[Name]
[Surface]
[Depth]
This is the table I have
Name | Surface | Depth |
Well1 | A | 12 |
Well1 | B | 21 |
Well1 | C | 34 |
Well1 | D | 40 |
Well2 | A | 5 |
Well2 | B | 15 |
Well2 | C | 25 |
Well2 | D | 20 |
<tbody>
</tbody>
What I need: I need to subtract the second row [Depth] from the first row [Depth] for each well in [Name]
As you see below I call this field [Thickness] =SecondRow[Depth]-FirstRow[Depth]
I also drop the row which has last or Max [Depth] for each well in [Name] because I am calculating the thickness and keeping the final row would be redundant.
(this part can be left out if it is too complicated)
Name | Surface | Depth | Name | Surface | Depth | Thickness | |||
Well1 | A | 12 | Well1 | B | 20 | 8 | |||
Well1 | B | 21 | Well1 | C | 30 | 9 | |||
Well1 | C | 34 | Well1 | D | 40 | 6 | |||
Well2 | A | 5 | Well2 | B | 15 | 10 | |||
Well2 | B | 15 | Well2 | C | 25 | 10 | |||
Well2 | C | 25 | Well2 | D | 35 | 10 |
<tbody>
</tbody>
Any help is greatly appreciated!
Thanks!