Solved

Add  Crosstab values

Posted on 2013-06-18
2
307 Views
Last Modified: 2013-06-18
I have created a crosstab query and require a total for each row. can that be achieved in the crosstab

TRANSFORM Sum(qry_datehires.[count(DDAI_SM_EquipmentHireLogID)]) AS [SumOfcount(DDAI_SM_EquipmentHireLogID)]
SELECT qry_datehires.[date(SM_HireDate_TimeOut)]
FROM qry_datehires LEFT JOIN tbllocation ON qry_datehires.SM_LocationID = tbllocation.LocationID
GROUP BY qry_datehires.[date(SM_HireDate_TimeOut)]
ORDER BY qry_datehires.[date(SM_HireDate_TimeOut)] DESC 
PIVOT tbllocation.Location;

Open in new window

0
Comment
Question by:Brogrim
2 Comments
 
LVL 22

Accepted Solution

by:
Kelvin Sparks earned 500 total points
ID: 39256026
TRANSFORM Sum(qry_datehires.[count(DDAI_SM_EquipmentHireLogID)]) AS [SumOfcount(DDAI_SM_EquipmentHireLogID)]
SELECT qry_datehires.[date(SM_HireDate_TimeOut)], Sum(qry_datehires.[count(DDAI_SM_EquipmentHireLogID)]) AS Total
FROM qry_datehires LEFT JOIN tbllocation ON qry_datehires.SM_LocationID = tbllocation.LocationID
GROUP BY qry_datehires.[date(SM_HireDate_TimeOut)]
ORDER BY qry_datehires.[date(SM_HireDate_TimeOut)] DESC
PIVOT tbllocation.Location;

Should give you what you want


Kelvin
0
 

Author Closing Comment

by:Brogrim
ID: 39256066
Thanks
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
QuickBooks® has a great invoice interface that we were happy with for a while but that changed in 2001 through no fault of Intuit®. Our industry's unit names are dictated by RUS: the Rural Utilities Services division of USDA. Contracts contain un…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

23 Experts available now in Live!

Get 1:1 Help Now