I have two tables and there is no relationship between them and I need to calculate the sum of one column in the second table between two specific dates in the first table.
Please see the two tables I have.
The specific need is the sum process colored in red. That means, the sum of values in the second table between the dated in table one ( column: Stock Take Date and column: Date Last Stock Take) for the same water station.
Please note that the column (Date Last Stock Date) is claculated through the following equation:
MAX(table01[Stock take date]),
table01[Stock take date]<EARLIER(table01[Stock take date])))
In addition, the column (the Fuel Last Stock Take) is calcuated through the followng equation:
LOOKUPVALUE(table01[Total Fuel Amount in Water Station],table01[Stock take date],table01[Date Last Stock Date],table01[Water Station],table01[Water Station])