Results 1 to 2 of 2
  1. #1
    msadiqrajani is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2012
    Posts
    12

    Grouping query with percentage

    Hi,
    I have below dataset.

    Task Completed
    ------------------------
    TaskA y
    TaskB y
    TaskC n
    TaskA n
    TaskB n
    TaskA y
    TaskC n


    I need following output from dataset

    Task Total Completion%
    ------------------------------------
    TaskA 3 67%
    TaskB 2 50%
    TaskC 2 00%



    I have figureout how to get Total but am unable to figure out how to get Completion percentage.

    Please help me with query.
    Thanks

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    This would be easy to do in a report using Grouping & Sorting with aggregate calcs. The report would allow display of the detail records and summary calcs. Just set report RecordSource to the source data table/query and do summary calcs in report and group headers/footers. The percentage calc would be an expression in textbox of Task group header/footer that refers to Count calc textbox in report header/footer and Count calc textbox in group header/footer: [tbxGroupCount]/[tbxTotalCount]
    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. Replies: 28
    Last Post: 03-13-2012, 07:48 AM
  2. Grouping hours query
    By DMP84 in forum Queries
    Replies: 0
    Last Post: 08-26-2010, 07:15 AM
  3. Percentage Calculation in a Query
    By Lynn in forum Queries
    Replies: 1
    Last Post: 07-16-2010, 11:23 PM
  4. Grouping query
    By Mphiri in forum Programming
    Replies: 10
    Last Post: 06-15-2010, 08:58 AM
  5. percentage in a query
    By Peljo in forum Access
    Replies: 2
    Last Post: 02-27-2008, 10:51 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