Results 1 to 3 of 3
  1. #1
    Peterz7 is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jun 2017
    Posts
    6

    Combining falues into one in a query

    Hi all,
    I've got a quick question I'm afraid for which there is no solution but I thought I'd try.....



    I'm summing transaction records for a given time period in a query, by a specific value (that comes from a system I cannot change)

    Values (for Region) are: East, West, North, South, Other, Misc, Unknown and occasionally NULL

    What I'd like for a result is totals for East, West, North, South, and to combine "Other", "Misc", Unknown" and NULL into one grouping, say with the name "Other"

    Has anyone run into this problem? Is there solution for this? Without being able to modify production data, I'm brainstorming other workarounds if this is not possible within the summation query.

    Thanks for reading this. I appreciate any suggestions any of you may have.
    -Peter

  2. #2
    CJ_London is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,932
    use a group by query, and rather than grouping on 'Region', group on a calculated value, something like


    RegionGrp: iif(nz(region,"Other") in ("Other", "Misc", "Unknown"),"Other",Region)

  3. #3
    Peterz7 is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Jun 2017
    Posts
    6
    Quote Originally Posted by Ajax View Post
    use a group by query, and rather than grouping on 'Region', group on a calculated value, something like


    RegionGrp: iif(nz(region,"Other") in ("Other", "Misc", "Unknown"),"Other",Region)

    This worked! Thank you so much, I really appreciate your help. You're awesome!

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

Similar Threads

  1. combining dates in query
    By WimDC in forum Queries
    Replies: 2
    Last Post: 08-26-2013, 12:21 PM
  2. Replies: 14
    Last Post: 07-22-2013, 12:39 PM
  3. Combining fields in a Query
    By sevanty7 in forum Access
    Replies: 2
    Last Post: 05-10-2013, 10:57 AM
  4. Combining rows in query?
    By rev in forum Queries
    Replies: 2
    Last Post: 04-23-2012, 08:47 AM
  5. Combining Tables by Query
    By jlclark4 in forum Queries
    Replies: 9
    Last Post: 01-25-2011, 12:19 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