Results 1 to 4 of 4
  1. #1
    keith2511 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2017
    Location
    UK
    Posts
    45

    Crosstab Query to show percentage of row total

    I have a crosstab query which sums the values of a type of product by date and location - table1.

    How can I add another column to row the value of Type A as a percentage of the Total Of Quantity?

    Click image for larger version. 

Name:	Capture.PNG 
Views:	14 
Size:	14.9 KB 
ID:	37893



    Thanks
    Attached Thumbnails Attached Thumbnails table1.PNG  

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,820
    Use the CROSSTAB in another query.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  3. #3
    keith2511 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2017
    Location
    UK
    Posts
    45
    Thank you for replying but I would need more detail to understand your suggestion.

    If the result of the query groups the same table field (name of type) by it's contents (Type_A, Type_B), how do I refer to only values of Type_A in the subsequent query?

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,820
    SELECT [Date], Short_Name, TypeA, TypeB, Nz(TypeA/TotalOfQuantity*100,0) AS Pct FROM queryname;
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Have a query show the percentage of an amount
    By TrulyVisceral in forum Queries
    Replies: 4
    Last Post: 05-17-2018, 05:52 PM
  2. Total bar in a Crosstab query
    By djclinton15 in forum Queries
    Replies: 8
    Last Post: 08-31-2017, 02:26 PM
  3. Crosstab Query with Percentages of Total
    By McArthurGDM in forum Queries
    Replies: 4
    Last Post: 05-07-2015, 02:48 PM
  4. Replies: 10
    Last Post: 10-19-2012, 05:10 AM
  5. Replies: 28
    Last Post: 03-13-2012, 07:48 AM

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