Results 1 to 6 of 6
  1. #1
    athyeh is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2013
    Posts
    170

    Summing Groups

    Hi Folks,

    Developing a report today and have another question:

    I have a report that is grouped as follows:
    Operator
    Month
    Date
    Sort by Process
    Process

    Within Process there are two options: A and B

    I have also added in a Totals Function (Sum) To total so the report looks like this:

    JohnSmith
    10
    10/1/13
    A 13


    B 14
    27

    Is there anyway to add a sum on the bottom that shows the sum for A and B as part of the Grand Total?

    So:

    Total A 100
    Total B 200
    Grand Total 300

    Thanks!

  2. #2
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Try:

    Sum(IIf([Sort By Process]="A",[Process],0))

    Sum(IIf([Sort By Process]="B",[Process],0))
    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
    athyeh is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2013
    Posts
    170
    Returns: #Error

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Did you do this in a textbox? Did you include the = sign in front of expression? Did you use your actual field names?
    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.

  5. #5
    athyeh is offline Competent Performer
    Windows XP Access 2007
    Join Date
    Jun 2013
    Posts
    170
    Hi June,

    I believe so, unless [sort by process], and [process] were variables that I needed to change as well?

    Sum(IIf([Sort By Process]="B",[Process],0))

  6. #6
    June7's Avatar
    June7 is online now VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    If you have the = sign and correct field names and the textbox is in a footer section, that should work. Otherwise, I would have to analyse db. If you want to provide, follow instructions at bottom of my post. Identify report involved.
    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. Summing Multiple Queries & Summing Time
    By WEJ in forum Queries
    Replies: 2
    Last Post: 10-04-2013, 04:46 PM
  2. Making groups within a query
    By louielol in forum Queries
    Replies: 5
    Last Post: 02-06-2012, 05:33 PM
  3. Query with several groups
    By jvlajcic in forum Queries
    Replies: 1
    Last Post: 12-19-2011, 10:25 AM
  4. Sum by groups
    By Lorlai in forum Access
    Replies: 1
    Last Post: 07-21-2011, 11:42 AM
  5. using date for groups
    By antcox2004 in forum Reports
    Replies: 3
    Last Post: 01-28-2006, 07:44 PM

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