Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have the following IF statement and it is giving me error.
Anybody can help.
if ((Year([Payment Date]) = Year(ExpenseStartDate)) ,
([Expense Amount (USD)]*2) ,
If (Year(PaymentDate)> Year([ExpenseEndDate])),
([Expense Amount (USD)]*3),
If (Year(PaymentDate)< Year([ExpenseEndDate])),
([Expense Amount (USD)]*3),
[Expense Amount (USD)]) as [Expense Amount (USD)]
Thanks,
Correct syntax would be
if (Year([Payment Date]) = Year(ExpenseStartDate) ,
([Expense Amount (USD)]*2) ,
If (Year(PaymentDate)> Year([ExpenseEndDate]),
([Expense Amount (USD)]*3),
If (Year(PaymentDate)< Year([ExpenseEndDate]),
([Expense Amount (USD)]*3),
[Expense Amount (USD)]))) as [Expense Amount (USD)]
Correct syntax would be
if (Year([Payment Date]) = Year(ExpenseStartDate) ,
([Expense Amount (USD)]*2) ,
If (Year(PaymentDate)> Year([ExpenseEndDate]),
([Expense Amount (USD)]*3),
If (Year(PaymentDate)< Year([ExpenseEndDate]),
([Expense Amount (USD)]*3),
[Expense Amount (USD)]))) as [Expense Amount (USD)]