Hello all
I wonder if anyone could help please. I am creating a database which calculates employee commissions due based on certain criteria in a report.
There are 3 targets and the commission due is dependant on which target is met, so for instance if target 1 is met, the commission per sale is X, if target 2 is met, the commission per sale is Y, and if target 3 is met, the commission per sale is Z.
So I have a number of calculated fields to determine qualifying sales and now I want to show the commission due. I am currently using the following expression (and variations of) which works fine, however I have to create this expression 3 times modified for each target:
=IIf([Target3MetT1]="Yes",[SumT1]*1.5,"0")
What I want is to have an expression like the following (which doesn't work) which only show the commission due for the highest target, 1, 2 or 3. Currently the above is expression is created 3 times, once for each target so shows the total due for each target but I only want to show the highest value as I am going to need to add them up at the end.
Any help appreciated and happy to answer questions, I am using Access 2007 on Windows 7 64bit
Thanks
=IIf([Target3MetT1]="Yes",[SumT1]*1.5)=IIf([Target2MetT1]="Yes",[SumT1]*1)=IIf([Target1MetT1]="Yes",[SumT1]*0.5,"0")