Results 1 to 4 of 4
  1. #1
    RogerC is offline Novice
    Windows XP Access 2010 64bit
    Join Date
    Jul 2012
    Posts
    4

    Sum only first record of group

    My data is structuredin the following format:
    ITEM......................PRICE
    X..............................$10
    X..............................$10
    Y------------------------$25


    Y------------------------$25

    I would like to calculate each item's price only once in the Access report footer. However, when the SUMformula is entered I get the cumulative price for each item (i.e. $70 asopposed to $35).

    Is there any way I could just show the price of the first item of the group only? I'mthinking of creating a new field in a query and adding 1s and 0s, but don'tknow exactly how.

    Is there another way of handling this? Thank you all foryour input.


  2. #2
    recyan's Avatar
    recyan is offline Expert
    Windows 2K Access 2000
    Join Date
    Dec 2011
    Posts
    662
    Till some one comes along, a few questions :
    Quote Originally Posted by RogerC View Post
    My data is structuredin the following format:
    ITEM......................PRICE
    X..............................$10
    X..............................$10
    Y------------------------$25
    Y------------------------$25

    I would like to calculate each item's price only once in the Access report footer.
    Do you want

    ITEM......................PRICE
    X..............................$10
    Y------------------------$25

    OR

    ITEM......................PRICE
    X..............................$20
    Y------------------------$50

    in the footer.

    Thanks

  3. #3
    RogerC is offline Novice
    Windows XP Access 2010 64bit
    Join Date
    Jul 2012
    Posts
    4
    Recyan, this is what I want:

    ITEM
    ......................PRICE

    X..............................$10
    Y------------------------$25

    Basically, in the summation, I'm trying to include each item's price only once. So instead of adding all Xs and all Ys, I want to add only one X and one Y (the desired outcome would be $35 for the above example).
    Thank you for your response.


  4. #4
    recyan's Avatar
    recyan is offline Expert
    Windows 2K Access 2000
    Join Date
    Dec 2011
    Posts
    662
    Don't know if I have understood things correctly.

    You could perhaps, have a sub-report, based on below query, which you could then, incorporate in your main-report.

    Code:
    SELECT DISTINCT myTable.ITEM, myTable.PRICE
    FROM myTable
    ORDER BY ITEM;
    Thanks

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

Similar Threads

  1. Replies: 2
    Last Post: 06-21-2012, 07:40 PM
  2. Group title carrying forward to next group
    By Amandasr12 in forum Reports
    Replies: 3
    Last Post: 06-06-2012, 02:13 PM
  3. Replies: 5
    Last Post: 09-22-2011, 02:10 PM
  4. GROUP numerous lines to one record
    By tweetyksc in forum Queries
    Replies: 3
    Last Post: 07-21-2010, 01:14 PM
  5. columns for group detail but not group header?
    By Coolpapabell in forum Reports
    Replies: 0
    Last Post: 08-21-2009, 08: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