Yes the column heads are projects. I tried several variations of cross-tab queries, but couldn't get the data to display correctly. Here is description of where the data comes from:
6 Tables: (1)Projects = contains the title, customer info, other pertinent project data. (2)Profit Centers(PC) = employees, (3)Invoice_Projections = related to projects using ProjectID, it contains the month, year,and amount of invoices, and (4)tblSplits = related to Projects and Profit Centers, contains three % fields per project and pc. (5) Regions = related to Project, the region a project is in determines the respective % allocations of three categories (Sales, Delivery, and Mgt). (6) Dates = Not sure why I did this, but invoice projections table does not tie month and year together in the same control, the user selects a month, then a year. Dates table's purpose is to allow me to sort the combination of the month and date in order. Dates has 2 fields, DateID and MoYear.
Description of use: Basically, each project has a Sales, Mgt, and Delivery aspect. Every invoice amount is broken up into the 3 categories. Mgt assigns % of these 3 categories to employees based on their level of effort on the project. A combination of the employees % and actual invoices results in a "Revenue Generation" calc for each employee. Example:
1. Project A is in region A and has the following region splits: 25% Sales, 70% Delivery, 5% Mgt.
2. Project A has the following PC splits: Employee A, 0% Sales, 50% Delivery, 0% Mgt. Employee B 100% Sales, 0% Delivery, 0% Mgt. Employee C 0% Sales, 50% Delivery, 100% Mgt.
3. When an invoice for $10000 is paid, Employee A gets a revenue generation calc of $3500 (0$ sales, $3500 delivery, $0 mgt). Employee B $2500 ($2500 Sales, $0, and $0) and Employee C $4000 ($0 sales, $3500 del, $500 mgt)
There is a form where the CEO specifies a date range. After he sets the range, he clicks a button to see the "Revenue Generation Report". Embarrassingly, this is what is done to generate that report:
1.qrySplitCredits: Purpose is to pull all of the data that meets the date criteria together and generate the $ values of each split category per employee.
SELECT Splits!PCID & Projects!ProjectID & [MoYear] AS DKey, Splits.PCID, Projects.ProjectID, [LastName] & ", " & Left([firstname],1) AS FName, Projects.Project_Title, Dates.MoYear, Invoice_Projections.Amount, ([MGR1_Split]+[MGR2_Split]+[MGR3_Split]+[MGR4_Split]+[MGR5_Split])*[Amount] AS MGRCredit, [Sales_Split]*[Amount] AS SalesCredit, [Delivery_Split]*[Amount] AS DelCredit, [SSplitVal]*([Sales_Split]*[AMount]) AS PCSalesCredit, [DSplitVal]*([Delivery_Split]*[AMount]) AS PCDelCredit, [MSplitVal]*[AMount] AS PCMgtCredit, Splits.SSplitVal, Splits.DSplitVal, Splits.MSplitVal, [PCSalesCredit]+[PCDelCredit]+[PCMgtCredit] AS PCTot, Dates.DateID, Region.Region
FROM (Region INNER JOIN ((Projects INNER JOIN (Dates INNER JOIN Invoice_Projections ON Dates.DateID = Invoice_Projections.DateID) ON Projects.ProjectID = Invoice_Projections.ProjectID) INNER JOIN Splits ON Projects.ProjectID = Splits.ProjectID) ON Region.REGID = Projects.REGID) INNER JOIN [Profit Centers] ON Splits.PCID = [Profit Centers].PCID
WHERE (((Dates.DateID)>=[Forms]![frmRevGen]![FromDate] And (Dates.DateID)<=[Forms]![frmRevGen]![ToDate]))
ORDER BY Projects.Project_Title;
2.XMasDelivery

opulates a table with the Delivery credits for each employee. I wipe XMaster clean before these queries populate it.
INSERT INTO XMaster ( PCID, ProjectID, SplitType, MoYr, Val, DateID, [Val$] )
SELECT qrySplitCredits.PCID, qrySplitCredits.ProjectID, "Del" AS SplitType, qrySplitCredits.MoYear, qrySplitCredits.DSplitVal, qrySplitCredits.DateID, qrySplitCredits.PCDelCredit
FROM qrySplitCredits;
XMasSales:
INSERT INTO XMaster ( PCID, ProjectID, SplitType, MoYr, Val, DateID, [Val$] )
SELECT qrySplitCredits.PCID, qrySplitCredits.ProjectID, "Sales" AS SplitType, qrySplitCredits.MoYear, qrySplitCredits.SSplitVal, qrySplitCredits.DateID, qrySplitCredits.PCSalesCredit
FROM qrySplitCredits;
XMasMgt:
INSERT INTO XMaster ( PCID, ProjectID, SplitType, MoYr, Val, DateID, [Val$] )
SELECT qrySplitCredits.PCID, qrySplitCredits.ProjectID, "Mgt" AS SplitType, qrySplitCredits.MoYear, qrySplitCredits.MSplitVal, qrySplitCredits.DateID, qrySplitCredits.PCMgtCredit
FROM qrySplitCredits;
XMaster: Table contains PCID, ProjectID, SplitType, MoYr, Val, DateID, and Val$ (as built from three Xmas queries above)
X_PC_Proj: Purpose is to ensure every employee that has been assigned a % value to at least 1 project is given respective categories for all projects.
SELECT XPCs.PCID, XProjIDs.ProjectID, XMaster.SplitType
FROM XPCs, XProjIDs, XMaster
GROUP BY XPCs.PCID, XProjIDs.ProjectID, XMaster.SplitType;
ZAnswer: Purpose is that this query gives me the complete data set for the RevGen report. Employees will have three values (or at least spots for data) for every project on the report.
SELECT X_PC_Proj.PCID, X_PC_Proj.ProjectID, X_PC_Proj.SplitType, Avg(XMaster.Val) AS AvgOfVal, Sum(XMaster.[Val$]) AS [SumOfVal$]
FROM X_PC_Proj LEFT JOIN XMaster ON (X_PC_Proj.PCID = XMaster.PCID) AND (X_PC_Proj.ProjectID = XMaster.ProjectID) AND (X_PC_Proj.SplitType = XMaster.SplitType)
GROUP BY X_PC_Proj.PCID, X_PC_Proj.ProjectID, X_PC_Proj.SplitType;
ZZZ: Purpose is just to have the final data in a non-Totals query, with a couple key information points (title, first and last name (Fname).
SELECT Projects.Project_Title, ZAnswer.ProjectID, ZAnswer.PCID, [LastName] & ", " & Left([FirstName],1) AS FName, ZAnswer.SplitType, ZAnswer.AvgOfVal, ZAnswer.[SumOfVal$]
FROM (ZAnswer INNER JOIN [Profit Centers] ON ZAnswer.PCID = [Profit Centers].PCID) INNER JOIN Projects ON ZAnswer.ProjectID = Projects.ProjectID;
The report is based off the very logically named ZZZ query, with a Page header, a ProjectID header, and FName header. Sorted by smallest to largest on ProjectID, Ato Z on FName and SplitType.
Sigh. I apologize for sucking in advance.