Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all,
today i am facing another challange trying to work with previous records.
here is what i have:
ProjectID | Date | BudgetSpent | TotalBudget |
---|---|---|---|
111 | 2013-05-01 | 0 | 50000 |
111 | 2013-05-02 | 10000 | 50000 |
111 | 2013-05-03 | 15000 | 50000 |
111 | 2013-05-04 | 12000 | 50000 |
I want to add another column to this table that gives me per day the [Remaining Budget]. Shold read something like this:
ProjectID | Date | BudgetSpent | TotalBudget | RemainingBudget |
---|---|---|---|---|
111 | 2013-05-01 | 0 | 50000 | 50000 |
111 | 2013-05-02 | 10000 | 50000 | 40000 |
111 | 2013-05-03 | 15000 | 50000 | 25000 |
111 | 2013-05-04 | 12000 | 50000 | 13000 |
I have multiple projects in this table and my idea was to
1. check if ProjectID = Previous(ProjectID)
2. if NO: take Total Budget - Budget Spent as RemainingBudget
3. if YES: take Previous(RemainingBudget) - BudgetSpent as Remaining Budget
But the LOAD fails, because the field RemainingBudget cannot be found in the NO condition of my if clause.
Any hint is much appreciated!
thanks!
K
Hi,
I have tried to get output as you have shown in second Table
See the sample
Could please share the exact code portion you are using?
Thanks.
Hi,
I am using the peek () and previous function with nested If() statement .
Hi,
Find attachment.. It will help u