Take a look at the Performance worksheet in the Superstore sample workbook. It is a good example of what you're trying to achieve.
In your case, "Sales Target" is the same as quota. You will need a similar data source to list the salesperson and their quota.
The missing calculation for your example is the bonus, so that would be something to this effect: If SUM([Sales])>[Quota] then (SUM([Sales])-[Quota]) * $40 END.