Results 1 to 2 of 2
  1. #1
    finlain is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2010
    Posts
    6

    Use a subtotal and %total

    Hi
    I have a query and I am trying to subtotal by "Provider" for each sales associate. Then take the %to total of the provider by name for each associate.

    I can do it in Excel using a Pivot Table very easily but I would like to do it in Access saving me some steps.

    Click image for larger version. 

Name:	ati.jpg 
Views:	4 
Size:	96.4 KB 
ID:	11732Click image for larger version. 

Name:	ATI_1.jpg 
Views:	4 
Size:	109.8 KB 
ID:	11733Any help would be much appreciated.

    Thanks


    Elaine

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,442
    If you're doing this on a report and you want to subtotal on the report that's one thing, if you're looking to do it in a query, don't. The methods you'd have to use would really bog down your query. I'm assuming the image on the left is what you're trying to get to.

    If that's the case on your report set your sorting and grouping in layers:

    DBA_ArcTable.Name is your first sort
    tblAgentNameID.Name is your secondary sort
    Provider is your tertiary sort

    Create a HEADER and FOOTER section for your provider, shrink the DETAIL section of the report to a height of 0

    Put in the provider label and put in a text box with the formula = count(provider)
    in the tblAgentNameID.Name footer, put the same formula and name it something like 'AgentSubtot'
    create another text box in your PROVIDER footer with the formula = count(provider)/[AgentSubTot] that should provide you the percentage of that provider for that agent

    from there it's just a matter of formatting section footers and adding formulas where appropriate.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Subtotal on Query
    By claysea in forum Queries
    Replies: 1
    Last Post: 02-17-2012, 10:56 AM
  2. Subtotal Count
    By veritoanimus in forum Queries
    Replies: 3
    Last Post: 12-21-2011, 01:34 PM
  3. Help with subtotal first record in report
    By leslina76 in forum Access
    Replies: 1
    Last Post: 08-25-2011, 01:54 PM
  4. Continuous Form Subtotal
    By luckysarea in forum Forms
    Replies: 5
    Last Post: 05-20-2011, 01:48 PM
  5. Subtotal
    By abc in forum Access
    Replies: 3
    Last Post: 01-31-2011, 04:47 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums