Hello Everybody
This is my first post. Can you please help me with the following problem:
In my database I have certain defined milestones, each having a certain amount of money allotted as its cost.
This cost is released in several steps over time.
1. Sometimes the cost is released as an absolute amount,
2. sometimes the released amount is described as a percentage of the allotted cost and
3. sometimes as a percentage of the payment yet to be released.
i.e. say, if the cost of milestone A1 is $10,000
i may release $100 on 1 Jan
then 5% of $10,000 on 7 Jan
and then 20% of whatever is the balance payment
and so on, in no particular order, until the entire cost is paid
My inputs are the milestone number, amount released (either [%] or [absolute] or [% of balance]) and date of release
The payments for many milestones can also be released simultaneously (either with the same amounts or differing amounts)
Please tell me how to construct a query such that i get a tabulation sorted by milestone number and then sorted by date and an accompanying column indicating the amount of payment left after that particular date's payment.
for eg. something like below,
Milestone no. Date Amount Balance
A1 1 jan 1000
A1 3 jan 500
A1 7 Jan 200
A2 1 jan 10000
A2 3 jan 4000
If the problem is not clear please ask me, I have also attached a small demo file.
![]()