Hi All,
My ACCESS QUERY 1 uses inner join with 2 tables and generates data like below.
Date Customer_ID UNIT
9/3/2015 AAA 300
9/4/2015 BBB 400
9/5/2015 AAA 500
9/8/2015 AAA 600
9/10/2015 CCC 700
9/12/2015 FFF 750
9/13/2015 CCC 250
There is a separate Access table "WeekTbl" which has data like below
WEEK DAYS
9/4/2015 9/3/2015
9/4/2015 9/4/2015
9/4/2015 9/5/2015
9/8/2015 9/7/2015
9/8/2015 9/8/2015
9/8/2015 9/9/2015
9/11/2015 9/10/2015
9/11/2015 9/11/2015
9/11/2015 9/12/2015
My Requirement - I want to createEXCEL REPORT that shall have data like below.
Week Count of ID Total Unit
9/4/2015 02 1200 ( Take all days in week 9/4/2015 from WeekTbl, Count Cusotmer-ID
and SUM Unit from my access query
1)
9/8/2015 01 600 ( Take all days in week 9/8/2015, Count Cusotmer-ID and SUM unit)
9/11/2015 02 1450 ( Take all days in week 9/11/2015 , Count Cusotmer-ID and SUM unit)
Currently i am copying all the data generated by ACCESS QUERY 1 into excel and apply filter manually by looking which days to include from table "WeekTbl". Using SUM function i m getting Total units and using COUNTIF to get the
count of each ID. But i have nearly 50 weeks to filter each time so its very time consuming process.
I want to automate the process of generating EXCEL REPORTbyVBAor Access query or excel which will do the following
- Read each week from table "WeekTbl"
- Count number of Customer_ID for the days that fall under that particular week from my access query 1
- Sum Unit for the days that fall under that particular week From my access query 1
Is it possible to create 3 new field in my ACCESS QUERY 1OR create new query which will give Week, Count of ID and SUM of Unit?
Thanks,
Zaveri