In the database attached, I have a table called NET Position which adds the Market Sales and Market Purchases together. The problem is that for one of the entries, "EWEB", it is not a direct calculation. The SQL I came up with is below, but I can't seem to get it to work. Access says, "You tried to execute a query that does not include the specified expression as part of an aggregate function" I'm wondering if it is even possible to do a custom calculation on a query.
NET Position: IIf([CompanyName]="EWEB",IIf(IsNull([qryMarketSales]![Revenue]),0,[qryMarketSales]![Revenue])+IIf(IsNull([qryMarketPurchases]![Cost]),0,[qryMarketPurchases]![Cost])-18500-(Sum([qryMarketSales]![Revenue])*0.01),IIf(IsNull([qryMarketSales]![Revenue]),0,[qryMarketSales]![Revenue])+IIf(IsNull([qryMarketPurchases]![Cost]),0,[qryMarketPurchases]![Cost]))
If this isn't possible, do you have any ideas how I could get the EWEB calculation to appear differently?