Solved

Add  Crosstab values

Posted on 2013-06-18
2
310 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

Migrating Your Company's PCs

To keep pace with competitors, businesses must keep employees productive, and that means providing them with the latest technology. This document provides the tips and tricks you need to help you migrate an outdated PC fleet to new desktops, laptops, and tablets.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
With Microsoft Access, learn how to specify relationships between tables and set various options on the relationship. Add the tables: Create the relationship: Decide if you’re going to set referential integrity: Decide if you want cascade upda…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

856 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