Spending by primary function