Unanswered: related fields in one single table/query
There is a table with fields: ID, “employee name”, “amount”, “amount type: expense/income” and “date”. On the fourth field we can choose the amount type if it is an expense or income. At the end, we want to sum up all the amounts. Is there a function that we can make the amount number on the third field to be negative or positive based on our selection on the fourth field? For example if the amount is 200 and the forth field is expense it will be calculated as to be -200, but if the fourth field is income it will be +200.