Sort report by group total?

tweetyksc

Registered User.
Local time
Today, 23:03
Joined
Aug 23, 2001
Messages
87
I have a report built from a query with has:
--------------------------------------
-[Item Number] (grouped by)
[Customer Number] [Total Qty] [ Total $]
("Item Number" group footer) [Sum totalQty] [Sum of Total$]
------------------------------------------------------
This is a pretty simple report, except I've been asked to sort
this report by the Items that have the most Total$.
Items would still stay grouped, but the ones with total $ highest would be first, etc.
I'm kind of at a loss, other than screwing around with a pivot, etc.
Help!
 
How to get totals

Can I get totals in a query per item?
Is there a way to do this other than a pivot table?
I'm familiar with doing pivot tables in Excel, but then I would need to use the pivot table data (how?) and combine somehow with the detail.
I've tried using a crosstab with no luck.

-------------------------
(item header) [Item#] [Total$]: 300 *INITIAL SORT
(detail) [Customer#] [qty] [$]
(detail) [Cust#] [qty] [$]
(item header) [Item#] [Total$]: 200
-----------------------------------------
This seemed so simple, I'm only using a few fields from the data, but it's turning out to be very difficult!!!
 
To get your totals first use your sigma key, and this adds the Group By command in your query. Click Group By and you'll find the other options , somewhat akin to Excel.

Then try the crosstab for totals, and failing that, try a query-on-a-query. Hope this helps.
 
Sigma key?

What is a signa key?

**never mind, I realized what you meant :)
 
Last edited:
I was able to get this working. It was a mistake on my end due to the way the data is set up. There are some items that may have a quantity used but show up as zero $ because they are prepaid. When I saw the zero$ I assumed something was not working correctly....once I got this straight in my head and looked beyond that everything was working fine.
Just goes to show you, never assume!
 

Users who are viewing this thread

Back
Top Bottom