Is there any way to get grand totals (sum of columns) into a cross tab query?
![]() |
There are isolated problems with current patches, but they are well-known and documented on this site. |
SIGN IN | Not a member? | REGISTER | PLUS MEMBERSHIP |
-
Grand Totals in Cross Tab Query (Access ’03)
Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Grand Totals in Cross Tab Query (Access ’03)
- This topic has 15 replies, 2 voices, and was last updated 20 years, 3 months ago.
AuthorTopicWSNeophyte
AskWoody LoungerFebruary 28, 2005 at 9:06 pm #416462Viewing 0 reply threadsAuthorReplies-
WSHansV
AskWoody Lounger -
WSNeophyte
AskWoody LoungerFebruary 28, 2005 at 10:01 pm #931742That would work if I just wanted to display them but I want to be able to use them in a calculation. Remember the report you so kindly helped me with? What I want to do is for each Division, use the sum of its montly totals as the divisor in the percentage calculation for that Division so that each segment shows a a percentage of the annual total for that Division.
-
WSHansV
AskWoody LoungerFebruary 28, 2005 at 10:42 pm #931743Referring back to that report (post 455173 for others reading this thread), do you want to do this for each individual payment category (greater than or equal to $100K, between $75K and $100K etc.), or only for the row total?
I have attached a rather messy version of the report from the post mentioned above. There are two extra queries and an extra subreport.
-
WSNeophyte
AskWoody Lounger -
WSHansV
AskWoody Lounger -
WSNeophyte
AskWoody LoungerMarch 1, 2005 at 12:24 am #931760I looked at that and unless I’m mistaken, the percents are correct in the total row and the total column but the monthly detail breakdown is not correct. It appears as though the monthly detail is still using the monthly total as the divisor to calculate the percentages.
Sorry to be such a pain in the butt.
-
WSHansV
AskWoody LoungerMarch 1, 2005 at 12:45 am #931762Below each amount in the detail section of the report, there are two percentages. The first indicates the percentage of the row total, i.e. the amount for that category as a percentage of the total amount for all categories (for that month and division). The second indicates the percentage of the column total for that company, i.e. the amount for that month as a percentage of the total amount for all months (for that category and division).
If that is not what you want, please explain in detail what you need. -
WSNeophyte
AskWoody Lounger -
WSHansV
AskWoody LoungerMarch 1, 2005 at 1:01 am #931765The crosstab query qrySumDivision calculates the column totals per division and per category.
The query qrySumTotal combines qrySum and qrySumDivision (joined on Division), and calculates the percentages.
The query qrySumTotal is used as Record Source for sbrSum; text boxes for the percentages were added to the detail section of this subreport.
The subreport sbrSumDivision is based on qrySumDivision. It is used in the group footer for Division on the main report, to show the column totals. -
WSNeophyte
AskWoody LoungerMarch 2, 2005 at 2:40 am #931982Hans. I am returning your database solution to my problem including a much larger data set (it’s actually my real data with everything changed to protect the innocent or guilty as the case may be). It appears that something gets out of sync between the qrySum and the qrySumTotal. The payment month order and therefore the record order is not consistent between the two which I believe is causing erroneous results but I’m not smart enough yet to understand how it is happening. It is also confusing to me that the record order is identical between the two query results for Bach and Beethoven beginning to get out of sync with Brahms. If you look at the first instance of Beethoven the percentages add up to 163.81%. so somehow the 972.99 is being divided by itself instead of the line total of 7818.31. Hopefully this will be simple for you. It is Dutch to me.
-
WSHansV
AskWoody Lounger -
WSNeophyte
AskWoody Lounger -
WSHansV
AskWoody Lounger -
WSNeophyte
AskWoody LoungerMarch 2, 2005 at 5:06 pm #932094Wow. This one is quite a bit faster.
Aha! I see the problem and to quote Strothers Martin from Cool Hand Luke, “What we have here is a failure to communicate” for which I take full responsibility and do apologize. Due to my faulty specification, I believe the problem was made more difficult than it should have been. What I was looking for in the “% of Total” row was that sorted cumulative entry divided by the sum of all of the lease payments (grand total) for that division. I believe that what this report does for that row is divide the sorted cumulative entry by the sum of all lease payments in that sort column for that division. I doesn’t appear to make much sense until you add 2 decimal places to the percent fields, then it quickly shows the relative importance of the leases for that division for the year.
-
WSHansV
AskWoody Lounger
-
-
-
-
Viewing 0 reply threads -

Plus Membership
Donations from Plus members keep this site going. You can identify the people who support AskWoody by the Plus badge on their avatars.
AskWoody Plus members not only get access to all of the contents of this site -- including Susan Bradley's frequently updated Patch Watch listing -- they also receive weekly AskWoody Plus Newsletters (formerly Windows Secrets Newsletter) and AskWoody Plus Alerts, emails when there are important breaking developments.
Get Plus!
Welcome to our unique respite from the madness.
It's easy to post questions about Windows 11, Windows 10, Win8.1, Win7, Surface, Office, or browse through our Forums. Post anonymously or register for greater privileges. Keep it civil, please: Decorous Lounge rules strictly enforced. Questions? Contact Customer Support.
Search Newsletters
Search Forums
View the Forum
Search for Topics
Recent Topics
-
What is wrong with simple approach?
by
WSSpoke36
28 minutes ago -
Microsoft-Backed Builder.ai Set for Bankruptcy After Cash Seized
by
Alex5723
6 hours, 56 minutes ago -
Location, location, location
by
Susan Bradley
7 hours, 25 minutes ago -
Cannot get a task to run a restore point
by
CWBillow
8 hours, 22 minutes ago -
Frustrating search behavior with Outlook
by
MrJimPhelps
3 hours, 20 minutes ago -
June 2025 Office non-Security Updates
by
PKCano
19 hours, 8 minutes ago -
Secure Boot Update Fails after KB5058405 Installed
by
SteveIT
1 hour, 11 minutes ago -
Firefox Red Panda Fun Stuff
by
Lars220
19 hours, 4 minutes ago -
How start headers and page numbers on page 3?
by
Davidhs
1 day, 5 hours ago -
Attack on LexisNexis Risk Solutions exposes data on 300k +
by
Nibbled To Death By Ducks
8 hours, 10 minutes ago -
Windows 11 Insider Preview build 26200.5622 released to DEV
by
joep517
1 day, 14 hours ago -
Windows 11 Insider Preview build 26120.4230 (24H2) released to BETA
by
joep517
1 day, 14 hours ago -
MS Excel 2019 Now Prompts to Back Up With OneDrive
by
lmacri
1 day, 3 hours ago -
Firefox 139
by
Charlie
20 hours, 27 minutes ago -
Who knows what?
by
Will Fastie
10 hours, 48 minutes ago -
My top ten underappreciated features in Office
by
Peter Deegan
1 day, 14 hours ago -
WAU Manager — It’s your computer, you are in charge!
by
Deanna McElveen
1 day, 9 hours ago -
Misbehaving devices
by
Susan Bradley
10 hours, 37 minutes ago -
.NET 8.0 Desktop Runtime (v8.0.16) – Windows x86 Installer
by
WSmeyerbos
2 days, 20 hours ago -
Neowin poll : What do you plan to do on Windows 10 EOS
by
Alex5723
18 hours, 11 minutes ago -
May 31, 2025—KB5062170 (OS Builds 22621.5415 and 22631.5415 Out-of-band
by
Alex5723
2 days, 19 hours ago -
Discover the Best AI Tools for Everything
by
Alex5723
1 day, 18 hours ago -
Edge Seems To Be Gaining Weight
by
bbearren
2 days, 9 hours ago -
Rufus is available from the MSFT Store
by
PL1
2 days, 17 hours ago -
Microsoft : Ending USB-C® Port Confusion
by
Alex5723
3 days, 20 hours ago -
KB5061768 update for Intel vPro processor
by
drmark
1 day, 20 hours ago -
Outlook 365 classic has exhausted all shared resources
by
drmark
1 day, 19 hours ago -
My Simple Word 2010 Macro Is Not Working
by
mbennett555
3 days, 16 hours ago -
Office gets current release
by
Susan Bradley
3 days, 18 hours ago -
FBI: Still Using One of These Old Routers? It’s Vulnerable to Hackers
by
Alex5723
5 days, 9 hours ago
Recent blog posts
Key Links
Want to Advertise in the free newsletter? How about a gift subscription in honor of a birthday? Send an email to sb@askwoody.com to ask how.
Mastodon profile for DefConPatch
Mastodon profile for AskWoody
Home • About • FAQ • Posts & Privacy • Forums • My Account
Register • Free Newsletter • Plus Membership • Gift Certificates • MS-DEFCON Alerts
Copyright ©2004-2025 by AskWoody Tech LLC. All Rights Reserved.