Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query that will sum 2values from 2 different crosstab query?

Status
Not open for further replies.

wshm

Programmer
Dec 7, 2006
62
0
0
US
I have two cross tab queries.
qry_PayCrostab which sums the wages

TRANSFORM Sum(Tbl_FTEallocation.Wages) AS SumOfWages
SELECT tbl_Dept.DpName
FROM tbl_Revenue INNER JOIN (tbl_Dept INNER JOIN Tbl_FTEallocation ON tbl_Dept.DPID = Tbl_FTEallocation.Dpid) ON tbl_Revenue.revnum = Tbl_FTEallocation.RevNum
GROUP BY tbl_Dept.DpName
ORDER BY tbl_Dept.DpName, tbl_Revenue.rvname
PIVOT tbl_Revenue.rvname;

and qry_BudTx which sums the budget total

TRANSFORM Sum(BudTx.BudTxAmt) AS BudTxAmtOfSum
SELECT tbl_Dept.DpName
FROM tbl_Dept INNER JOIN (tbl_Revenue INNER JOIN BudTx ON tbl_Revenue.revnum = BudTx.Revnum) ON tbl_Dept.DPID = BudTx.Dpid
GROUP BY tbl_Dept.DpName
ORDER BY tbl_Revenue.rvname
PIVOT tbl_Revenue.rvname;

Now i would like to make another "cross tab query"
that has same row heading and columns but where value = the sum of 'BudTxAmtOfSum' + 'SumOfWages'

so same looking crosstabl query which will capture the total of other 2 queries. Is this possible or do i need to make another table???
 
There is an faq in this forum that describes how to create more than one value in a crosstab faq701-4524.

Duane MS Access MVP
[green]Ask a great question, get a great answer.[/green] [red]Ask a vague question, get a vague answer.[/red]
[green]Find out how to get great answers faq219-2884.[/green]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top