As you can see there is alot of script in my query:
SELECT DISTINCTROW [Branch Codes].MarketArea, IIf([tbl_main].[retailer] Like
"*MBD*","MBD",[tbl_main].[retailer]) AS Branch, Year([SaveDate]) AS [Year],
Format([SaveDate],'mmmm') AS [Month], Month([SaveDate]) AS MonthNum,
[NonOpps]+[Opps] AS Calls, Sum(tbl_MAIN.NonOpps) AS NonOpps,
Sum(tbl_MAIN.Opps) AS Opps, Sum(tbl_MAIN.BookingMade) AS SumOfBookingMade,
Sum(tbl_MAIN.NonBookings) AS SumOfNonBookings, Sum(tbl_MAIN.PriceMatch) AS
SumOfPriceMatch, Sum(tbl_MAIN.Service) AS SumOfService,
Sum(tbl_MAIN.ServiceMot) AS SumOfServiceMot, Sum(tbl_MAIN.ServiceRepair) AS
SumOfServiceRepair, Sum(tbl_MAIN.MOT) AS SumOfMOT, Sum(tbl_MAIN.MOTRepair) AS
SumOfMOTRepair, Sum(tbl_MAIN.MB2U) AS SumOfMB2U, Sum(tbl_MAIN.Repair) AS
SumOfRepair, Sum(tbl_MAIN.RepeatRepair) AS SumOfRepeatRepair,
Sum(tbl_MAIN.VHC) AS SumOfVHC, Sum(tbl_MAIN.VHCRepair) AS SumOfVHCRepair,
Sum(tbl_MAIN.WarrantyRepair) AS SumOfWarrantyRepair, Sum(tbl_MAIN.NotDueYet)
AS SumOfNotDueYet, Sum(tbl_MAIN.CustomerAvailabiity) AS
SumOfCustomerAvailabiity, Sum(tbl_MAIN.Price) AS SumOfPrice,
Sum(tbl_MAIN.NoLongerHaveTheVehicle) AS SumOfNoLongerHaveTheVehicle,
Sum(tbl_MAIN.SellingVehicle) AS SumOfSellingVehicle, Sum(tbl_MAIN.Escalation)
AS SumOfEscalation, Sum(tbl_MAIN.ServiceQuotation) AS SumOfServiceQuotation,
Sum(tbl_MAIN.ServiceMotQuotation) AS SumOfServiceMotQuotation,
Sum(tbl_MAIN.MOTQuotation) AS SumOfMOTQuotation,
Sum(tbl_MAIN.BookedAtOtherMBRSite) AS SumOfBookedAtOtherMBRSite,
Sum(tbl_MAIN.CollectionAndDeliveryArranged) AS
SumOfCollectionAndDeliveryArranged, Sum(tbl_MAIN.In48Hrs) AS SumOfIn48Hrs,
Sum(tbl_MAIN.Amendment) AS SumOfAmendment, Sum(tbl_MAIN.Cancellation) AS
SumOfCancellation, Sum(tbl_MAIN.ServiceInformation) AS
SumOfServiceInformation, Sum(tbl_MAIN.TransferredInErrorNew) AS
SumOfTransferredInErrorNew, Sum(IIf([TransferredInErrorReason]="STM
Enquiry",1,0)) AS [TIE STM Enquiry],
Sum(IIf([TransferredInErrorReason]="Breakdown",1,0)) AS [TIE Breakdown],
Sum(IIf([TransferredInErrorReason]="Progress Update - Vehicle On Site
Today",1,0)) AS [TIE Update], Sum(IIf([TransferredInErrorReason]="Parts
Enquiry",1,0)) AS [TIE Parts Enquiry],
Sum(IIf([TransferredInErrorReason]="Directions",1,0)) AS [TIE Directions],
Sum(IIf([TransferredInErrorReason]="Technical Enquiry",1,0)) AS [TIE
Technical], Sum(IIf([TransferredInErrorReason]="Walk In / Same Day
Request",1,0)) AS [TIE Walkin], Sum(IIf([TransferredInErrorReason]="Body
Services / Accident Repair
Enquiry",1,0))+Sum(IIf([TransferredInErrorReason]="Dealership
Information",1,0))+Sum(IIf([TransferredInErrorReason]="Sales",1,0))+Sum(IIf([TransferredInErrorReason]="Service
History Enquiry",1,0))+Sum(IIf([TransferredInErrorReason]="Tyre
Enquiry",1,0))+Sum(IIf([TransferredInErrorReason]="Windscreen Enquiry",1,0))
AS [TIE Misc], Sum(tbl_MAIN.MBRUCBooking) AS SumOfMBRUCBooking
FROM [Branch Codes] RIGHT JOIN tbl_MAIN ON [Branch Codes].BranchName =
tbl_MAIN.Retailer
GROUP BY [Branch Codes].MarketArea, IIf([tbl_main].[retailer] Like
"*MBD*","MBD",[tbl_main].[retailer]), Year([SaveDate]),
Format([SaveDate],'mmmm'), Month([SaveDate])
HAVING (((IIf([tbl_main].[retailer] Like
"*MBD*","MBD",[tbl_main].[retailer]))>""))
ORDER BY IIf([tbl_main].[retailer] Like
"*MBD*","MBD",[tbl_main].[retailer]), Month([SaveDate]);
Hope This Helps John!