Results 1 to 2 of 2
  1. #1
    shjeong1192 is offline Novice
    Windows 8 Access 2013 64bit
    Join Date
    Sep 2019
    Posts
    2

    How do I exclude one part of a query

    New here so I might confuse some people with my ask-



    So I have a table that looks something like the below (dash to represent different column):

    Delivery Date - Food 1 (yes/no) - Food 2 (yes/no) - Food 3 (yes/no) - Value of Food Delivered

    There is a reason why I had to create True/False categorization for each of the type of food delivered, rather than a single column with "Food Type".
    I have a query that sums the rows together based on delivery date- and the food delivered on that day would show up true in a single row.
    Currently this also sums all the value of food delivered on the day.
    If I wanted to create another column in the query to sum the value of Food 1 and Food 2, even if Food 3 was also delivered, without having to exclude the fact that food 3 was indeed delivered, could I do this?

  2. #2
    shjeong1192 is offline Novice
    Windows 8 Access 2013 64bit
    Join Date
    Sep 2019
    Posts
    2
    Actually- sorry I found the answer- =sum(iif([Food3]=false,[ValueOfFoodDelivered],0))

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

Similar Threads

  1. Can't make a query compare and exclude...
    By surgicalstrike in forum Queries
    Replies: 29
    Last Post: 08-18-2015, 06:33 AM
  2. Query to exclude outliers
    By BRZ-Ryan in forum Queries
    Replies: 4
    Last Post: 03-19-2015, 09:05 AM
  3. Exclude IDs in grouped query
    By Ruegen in forum Queries
    Replies: 2
    Last Post: 09-02-2014, 09:27 PM
  4. Exclude TOP N records from query
    By gemadan96 in forum Queries
    Replies: 4
    Last Post: 06-15-2014, 10:11 AM
  5. exclude field in query
    By chrisy in forum Queries
    Replies: 2
    Last Post: 10-28-2011, 09:53 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