Results 1 to 3 of 3
  1. #1
    bryan0 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Connecticut
    Posts
    19

    Calculated Field in Crosstab Query

    Hello all, I have a CrossTab query that looks like this after being run:
    Vendor USA Mexico France Germany
    Burger King $500 $200 $400 $600
    McDonalds $250 $300 $300 $400
    Subway $700 $450 $350 $650
    I'd like to be able to add two columns to add certain columns together, without using a separate query to perform calculations on my CrossTab. Here's how I want it to look:
    Vendor USA Mexico France Germany Americas Europe
    Burger King $500 $200 $400 $600 $700 $1000
    McDonalds $250 $300 $300 $400 $550 $700
    Subway $700 $450 $350 $650 $1150 $950
    Is this possible using expressions? Or must I use a separate query? Thank you!

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,625
    Only 4 countries? Can mimic a CROSSTAB with IIf expressions. Review http://datapigtechnologies.com/flashfiles/crosstab.html
    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
    bryan0 is offline Novice
    Windows 7 64bit Access 2010 32bit
    Join Date
    Oct 2012
    Location
    Connecticut
    Posts
    19
    That will do it, I have 20 countries but can still apply the same logic by summing the IIF expressions. Thanks!

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

Similar Threads

  1. Replies: 9
    Last Post: 07-03-2013, 08:08 PM
  2. Replies: 3
    Last Post: 02-13-2013, 10:15 AM
  3. Replies: 1
    Last Post: 05-24-2012, 10:21 AM
  4. Update Query with a Calculated field
    By Lorlai in forum Queries
    Replies: 3
    Last Post: 09-21-2011, 10:57 AM
  5. CrossTab - insert a calculated field
    By weiguo.shi in forum Queries
    Replies: 10
    Last Post: 05-23-2011, 01:20 AM

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