This calculation helps calculate a present value of the time series of cash flow. This version takes into account whether or not the payment dates are regular or irregular intervals. This is represented normally as:
//In this version Interest Rate is set as a parameter to allow to adjust the variable. In theory any of the inputs (Except for payment dates) can be data driven OR parameter driven based on context of the problem. [Payments] include both positive and negative cash flow for this to work.
RUNNING_SUM(SUM([Payments])/(1+[Annual Interest Rate Parameter])^((MAX([Date])-LOOKUP(MAX([Date]),FIRST()))/365))
Inputs and Setup: (for table calculations, delete if not applicable)
For this calculation to work, the view must have each payment date displayed. This is used for the addressing of this table calculation.
Partitioning and Addressing: (for table calculations, delete if not applicable)
Address by the payment dates