Query and SUM for specific date range

ivica

New member
Local time
Today, 13:28
Joined
Nov 11, 2009
Messages
2
Hi all,

I'm not into this so pleas HELP me resolve my problem.
I have table that includes following data:

CUSTOMER ID--CUSTOMER NAME--PRODUCT ID--PRODUCT NAME--SALES PERIOD--AMOUNT

all data are in same table as they are imported from outsourced system.
Sales period are in format 150809 (DDMMYY) and it is always 15 or 30/31 of the month.
I made query that shows total SUM of customer sales for certain period
and in addition breakdown of customer sales for certain period/customer that shows all products that they sold.

For commission purposes I need to make query that will calculate total sales per customer in specified date/sales period.
How to define this criteria?

Cheers
 
Welcome to AWF,

You accomplish this by making a totals query... In design view click the Sigma sign (Sum sign -or M tilted to its side-) this adds a line that says: Total

In the line leave everything on "Group by" for everything that needs to be grouped i.e. customer name and sales period.
Then change to "Sum" anything that needs to be... summed

Run the query and live happily ever after :)
 
Thanks for quick reply!

But, problem is a little bit complex. :D
I need sum for specific date range. e.g.
give me total sales of all customers that had sales in period => 151108 =< 311009
Or with popup where I can enter start and end of date period that I wish to summaries.

Cheers!
 
give me total sales of all customers that had sales in period => 151108 =< 311009
Have a search for "search form" on the references part of the forum and see ifyou can make that work for you.

Note that if your "dates" are actually numbers or strings (and not actual dates) you will need to make them actual dates by using the functions Left, Right, Mid and Dateserial... Look them up on the access help to read all about them.
 

Users who are viewing this thread

Back
Top Bottom