A family of Microsoft relational database management systems designed for ease of use.
How do I write the formula to sum transaction amount for account type = "a" - sum transaction amount for account type = "b"?
Try this:
Sum([Transaction Amount] * Switch([Account Type] = "a",1,[Account Type] = "b",-1,True,0))
For each pair of expressions in the parameter array the Switch function returns the second of the first pair encountered in which the first expression of the two is True. So if the account type is "a" 1 will be returned, if "b", -1 will be returned, zero otherwise. So, the amount will be multiplied by 1 or -1, or zero if the account type is neither. The sum of these values is the equivalent of the sum of those where the account type is "a" less those where the account type is "b".