I tried to browse through several postings on Nz and iif statements. Coudln't find one that matches what I am looking for.
To calculate "Balance" there are 3 different situation
1. Balance = [Authorized] - [Expensed]
2. For balance where[Expense] = 0 I used
Balance: ([Authorized] - Nz([SumOfExpense],0))
3. For Expense is less than 0 (a negative due to overspending) is where I got stuck. When I tried iif statement it skipped where Expense has a zero value.
How do I capture all three situations in one function? Can I use a Nz statement to calculate Balance for all three situations? What I mean is to calculate Balance 1)iff Expense is Zero, do this, if Expense is less than Zero, do this, Otherwise Authorized less Expense equals Balance.
Can someone please help me with this?
Many thanks in advance.
To calculate "Balance" there are 3 different situation
1. Balance = [Authorized] - [Expensed]
2. For balance where[Expense] = 0 I used
Balance: ([Authorized] - Nz([SumOfExpense],0))
3. For Expense is less than 0 (a negative due to overspending) is where I got stuck. When I tried iif statement it skipped where Expense has a zero value.
How do I capture all three situations in one function? Can I use a Nz statement to calculate Balance for all three situations? What I mean is to calculate Balance 1)iff Expense is Zero, do this, if Expense is less than Zero, do this, Otherwise Authorized less Expense equals Balance.
Can someone please help me with this?
Many thanks in advance.
Comment