the code depends on what the calculation should display.
If you want one number "current proft" only: @sum of income - @sum of expenses.
@all of income and @all of expenses you can't use for math operations cause e.g. @all of income holds each income number: [12,13,111,112], dito for expenses.
If you want another result e.g. a list with the profit at the end of each month or for each day or something like that you need to describe it here.