Results 1 to 3 of 3
  1. #1
    Aviaccess is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2020
    Posts
    2

    Sum of same column twice based on different condition

    I have this

    project Id project name expenditure date of exp
    1 project 1. 10 1 Jan 2018
    1 project 1 5 5 Jul 2018
    1 project 1 2 12 May 2019


    2 project 2 4 1 May 2018
    1 project 1 3 5 Dec 2019
    2 project 2 2 5 Jul 2019
    3 project 3 5 1 Jul 2019
    3 project 3 5 6 Dec 2019
    4 project 4

    I want the below

    project Id project name total exp expenditure in 2018 expenditure in 2019
    1 project 1 20 15 5
    2 project 2 6 4 2
    3 project 3 10 0 10
    4 project 4 0 0 0

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    Use the query wizard and make a Crosstab query.

  3. #3
    Aviaccess is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Feb 2020
    Posts
    2
    Mamy many Thank you .. it worked

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

Similar Threads

  1. Replies: 4
    Last Post: 11-29-2017, 10:01 AM
  2. Replies: 2
    Last Post: 02-15-2017, 06:07 PM
  3. Using Derived Column in Where Condition
    By anunat in forum Programming
    Replies: 1
    Last Post: 07-12-2012, 10:13 AM
  4. Replies: 1
    Last Post: 04-15-2010, 02:07 AM
  5. Like condition for 1 column help pls!
    By stodd in forum Queries
    Replies: 1
    Last Post: 03-14-2010, 01:51 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