Results 1 to 5 of 5
  1. #1
    BatmanMR287 is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Jan 2014
    Posts
    69

    Need to Sum, then *100/49

    I have a total query that gives the sum of a column on a table. I need to pass off the sum*100/49 from the query. Can't seem to make it do what i want in that order. It has to sum first. Any ideas?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Build another query or build a report and do additional calcs there.
    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
    BatmanMR287 is offline Advanced Beginner
    Windows 7 64bit Access 2013
    Join Date
    Jan 2014
    Posts
    69
    Yes! I was really frustrated that I couldn't do it all in one query. I was going to build temp tables and lots of queries because I wasn't thinking straight.
    That works perfect and doesn't take a ton of time. Thanks June7!!

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    It can probably be done as all-in-one SQL with nested subquery.
    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
    hapm is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2014
    Posts
    197
    As always you can set the grouping to expression and use SUM(Field)*100/49, instead of using sum a grouping and Field*100/49 as the value. Using expression or sum as the grouping in design view is only a different presentation of the same SQL btw. The grouping settings are only to simplify the usage of aggregate functions. You can always write all of them as an expression.

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

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