M
Mark
Need to interpolate the date that PV10 of each ID equals Cumulative
Cash Flow for each ID from the following query:
ID Date CashFlow Cum_CashFlow PV10
003920072010 8/31/2003 17244.62 17244.62 275190.13
003920072010 12/31/2003 65953.59 83198.21 275190.13
003920072010 12/31/2004 150768.41 233966.62 275190.13
003920072010 12/31/2005 64825.41 298792.03 275190.13
003920072010 12/31/2006 237.68 299029.71 275190.13
003920075010 8/31/2003 28706.83 28706.83 515429.34
003920075010 12/31/2003 112337.47 141044.30 515429.34
003920075010 12/31/2004 277419.97 418464.27 515429.34
003920075010 12/31/2005 138962.25 557426.52 515429.34
003920075010 12/31/2006 6509.51 563936.03 515429.34
The interpolated date for ID 003920072010 would lie 64% of the time
between 12/31/2004 and 12/31/2005, or 8/20/2005. If the PV10 exceeds
the value shown in the table, I need to use the slope from the last
two points to extrapolate.
The query SQL is:
SELECT a.ID, a.TF, a.CashFlow, Sum(b.CashFlow) AS Cum_CashFlow,
First(a.PV10) AS PV10
FROM po4 AS a, po4 AS b
WHERE (((b.ID)=[a].[id]) AND ((b.TF)<=[a].[tf]))
GROUP BY a.ID, a.TF, a.CashFlow
ORDER BY a.ID, a.TF;
I'd really appreciate any suggestions and feedback. Perhaps this is
too complex for Access.
Thanks, Mark
Cash Flow for each ID from the following query:
ID Date CashFlow Cum_CashFlow PV10
003920072010 8/31/2003 17244.62 17244.62 275190.13
003920072010 12/31/2003 65953.59 83198.21 275190.13
003920072010 12/31/2004 150768.41 233966.62 275190.13
003920072010 12/31/2005 64825.41 298792.03 275190.13
003920072010 12/31/2006 237.68 299029.71 275190.13
003920075010 8/31/2003 28706.83 28706.83 515429.34
003920075010 12/31/2003 112337.47 141044.30 515429.34
003920075010 12/31/2004 277419.97 418464.27 515429.34
003920075010 12/31/2005 138962.25 557426.52 515429.34
003920075010 12/31/2006 6509.51 563936.03 515429.34
The interpolated date for ID 003920072010 would lie 64% of the time
between 12/31/2004 and 12/31/2005, or 8/20/2005. If the PV10 exceeds
the value shown in the table, I need to use the slope from the last
two points to extrapolate.
The query SQL is:
SELECT a.ID, a.TF, a.CashFlow, Sum(b.CashFlow) AS Cum_CashFlow,
First(a.PV10) AS PV10
FROM po4 AS a, po4 AS b
WHERE (((b.ID)=[a].[id]) AND ((b.TF)<=[a].[tf]))
GROUP BY a.ID, a.TF, a.CashFlow
ORDER BY a.ID, a.TF;
I'd really appreciate any suggestions and feedback. Perhaps this is
too complex for Access.
Thanks, Mark