Page 1 of 2 12 LastLast
Results 1 to 15 of 17
  1. #1
    Irunit is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2022
    Location
    Placeless
    Posts
    24

    Urgent Help with calculations

    Hello guys,



    This forum has been a life saver for me.
    I have a question within query, let us say I have 2 customers, customer 1 and 2. Customer 1 bought 5 books of X and customer 2 bought 6 books of X now in my orders tables I have custId 1 and 2 and when I run query it shows product X twice one for cust 1 and second for cust 2. so it shows 5 and 6 quantity, how can I get the total of these?

    Thank you

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,553
    Click the totals button and group by product with a sum of product in another column.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    Irunit is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2022
    Location
    Placeless
    Posts
    24
    hey thank you,

    How do I do that, "sum of product in another column."?


  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    6,553
    Just put product into another column in the query designer and use sum in the dropdown.
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  5. #5
    Irunit is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2022
    Location
    Placeless
    Posts
    24
    hello it is not working. Let me ask the question in another way.

    I have two customers who bought same product, one 5 and the second 6. how can I get the total if orders are in same table?

  6. #6
    Irunit is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2022
    Location
    Placeless
    Posts
    24
    I have created a quick mini example. as u see in my query, I see duplicate because I have two customers, my question is how to get the total? can u please add it in the database I sent, so I can learn.
    This may be simple to you but I am new to access.

    Thank you.test querry.zip

  7. #7
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,820

    Calculation

    Hi
    I find the easiest way to do this is in a Report

    See the attached
    Attached Files Attached Files

  8. #8
    Irunit is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2022
    Location
    Placeless
    Posts
    24
    I see, thank you.

    But I need in my report to see the total of all product regardless of customers.

    How can I do that? (even if it is complicated)

  9. #9
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,820
    Hi
    Not following.
    Your example database has a Total of 11 items Sold.

    What else would you need to see in the Report?

  10. #10
    Irunit is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2022
    Location
    Placeless
    Posts
    24
    I want a way that says Total of Orders are 30 and total of sales are 11.

    meant to say within the query field and not to press total and see SUM below. I need another field, right? but which calculation to write? (just thinking out loud)

  11. #11
    Irunit is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2022
    Location
    Placeless
    Posts
    24
    I see your point, and if the report is what I need, that is a new perfect way to do it.

    Thx for that..

    But what I need is like I said above, for those numbers to be within the query tables..

  12. #12
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,820
    Hi

    See the modified attached example
    Attached Files Attached Files

  13. #13
    Irunit is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2022
    Location
    Placeless
    Posts
    24
    Hi again, this is perfect.

    Is there a way to have same results in a row next to the one who are already in that query?

  14. #14
    Join Date
    May 2018
    Location
    Living in Scotland UK
    Posts
    1,820
    Hi

    Post a screenshot of what result you would like to see.

  15. #15
    Irunit is offline Novice
    Windows 10 Access 2016
    Join Date
    Aug 2022
    Location
    Placeless
    Posts
    24
    Click image for larger version. 

Name:	Untitled.png 
Views:	13 
Size:	50.5 KB 
ID:	48604

    Voila!

Page 1 of 2 12 LastLast
Please reply to this thread with any new information or opinions.

Similar Threads

  1. Urgent help pls on chart
    By A0114301 in forum Access
    Replies: 1
    Last Post: 04-23-2020, 10:31 AM
  2. Replies: 30
    Last Post: 09-30-2015, 10:58 AM
  3. In need of urgent HELP!
    By Noskills in forum Database Design
    Replies: 2
    Last Post: 04-21-2013, 09:36 AM
  4. please help urgent...thanks
    By dadas in forum Access
    Replies: 4
    Last Post: 10-13-2011, 01:42 PM
  5. I need help! Urgent! :(
    By Suzan in forum Database Design
    Replies: 0
    Last Post: 04-08-2006, 11:58 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