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
-
My Simple Word 2010 Macro Is Not Working (Awaiting moderation)
by
mbennett555
5 hours, 41 minutes ago -
Office gets current release
by
Susan Bradley
10 hours, 25 minutes ago -
FBI: Still Using One of These Old Routers? It’s Vulnerable to Hackers
by
Alex5723
1 day, 2 hours ago -
Windows AI Local Only no NPU required!
by
RetiredGeek
11 hours, 28 minutes ago -
Stop the OneDrive defaults
by
CWBillow
1 day, 3 hours ago -
Windows 11 Insider Preview build 27868 released to Canary
by
joep517
1 day, 13 hours ago -
X Suspends Encrypted DMs
by
Alex5723
1 day, 15 hours ago -
WSJ : My Robot and Me AI generated movie
by
Alex5723
1 day, 16 hours ago -
Botnet hacks 9,000+ ASUS routers to add persistent SSH backdoor
by
Alex5723
1 day, 16 hours ago -
OpenAI model sabotages shutdown code
by
Cybertooth
1 day, 17 hours ago -
Backup and access old e-mails after company e-mail address is terminated
by
M W Leijendekker
1 day, 5 hours ago -
Enabling Secureboot
by
ITguy
1 day, 12 hours ago -
Windows hosting exposes additional bugs
by
Susan Bradley
2 days, 1 hour ago -
No more rounded corners??
by
CWBillow
1 day, 21 hours ago -
Android 15 and IPV6
by
Win7and10
1 day, 10 hours ago -
KB5058405 might fail to install with recovery error 0xc0000098 in ACPI.sys
by
Susan Bradley
2 days, 13 hours ago -
T-Mobile’s T-Life App has a “Screen Recording Tool” Turned on
by
Alex5723
2 days, 16 hours ago -
Windows 11 Insider Preview Build 26100.4202 (24H2) released to Release Preview
by
joep517
2 days, 10 hours ago -
Windows Update orchestration platform to update all software
by
Alex5723
2 days, 23 hours ago -
May preview updates
by
Susan Bradley
2 days, 11 hours ago -
Microsoft releases KB5061977 Windows 11 24H2, Server 2025 emergency out of band
by
Alex5723
2 days, 2 hours ago -
Just got this pop-up page while browsing
by
Alex5723
2 days, 15 hours ago -
KB5058379 / KB 5061768 Failures
by
crown
2 days, 12 hours ago -
Windows 10 23H2 Good to Update to ?
by
jkitc
1 day, 15 hours ago -
At last – installation of 24H2
by
Botswana12
3 days, 15 hours ago -
MS-DEFCON 4: As good as it gets
by
Susan Bradley
12 hours, 57 minutes ago -
RyTuneX optimize Windows 10/11 tool
by
Alex5723
4 days, 3 hours ago -
Can I just update from Win11 22H2 to 23H2?
by
Dave Easley
2 days, 1 hour ago -
Limited account permission error related to Windows Update
by
gtd12345
4 days, 16 hours ago -
Another test post
by
gtd12345
4 days, 17 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.