I am trying to create a report where I have to sum fields by specific type and then subtract from another.
ex. Net Operating Income = Total Income - Total Expense
I would have data that has a type field ("INCOME", "EXPENSE").
I created something like this and it doesn't seem to be working.
"formula": "if(('type') == 'INCOME', ('amount'), 0) - if(('type') == 'EXPENSE', ('amount'), 0)"