BustyAshley
Registered User.
- Local time
- Today, 08:13
- Joined
- Sep 22, 2015
- Messages
- 22
Hi all,
I need a simple query or queries that will do the following.
First summarize the data by company name (Easy Part) then calculate the monthly value from 2 year to date values (Date field is text). I am going to append this list to another table to give me a monthly calculation by company.
The Current Period = Forms![Dashboard]![cboMonth]
My idea to pull the prior period was using another table [A2 Month Index]
that looks below, and use a DLookUp??
Current ,, Prior
006.2015 ,, 005.2015
007.2015 ,, 006.2015
008.2015 ,, 007.2015
See Example below - thx ash
Data Table:
Contract ,, Company ,, Period ,, YTD Value
1 ,, A ,, 007.2015 ,, 7
1 ,, A ,, 008.2015 ,, 8
2 ,, B ,, 007.2015 ,, 7
2 ,, B ,, 008.2015 ,, 8
3 ,, B ,, 008.2015 ,, 1
4 ,, C ,, 007.2015 ,, 14
5 ,, C ,, 007.2015 ,, 7
4 ,, C ,, 008.2015 ,, 16
5 ,, C ,, 008.2015 ,, 8
5 ,, D ,, 008.2015 ,, 2
Output table:
Company ,, Period ,, MTD Value
A ,, 008.2015 ,, 1
B ,, 008.2015 ,, 2
C ,, 008.2015 ,, 3
D ,, 008.2015 ,, 2
I need a simple query or queries that will do the following.
First summarize the data by company name (Easy Part) then calculate the monthly value from 2 year to date values (Date field is text). I am going to append this list to another table to give me a monthly calculation by company.
The Current Period = Forms![Dashboard]![cboMonth]
My idea to pull the prior period was using another table [A2 Month Index]
that looks below, and use a DLookUp??
Current ,, Prior
006.2015 ,, 005.2015
007.2015 ,, 006.2015
008.2015 ,, 007.2015
See Example below - thx ash
Data Table:
Contract ,, Company ,, Period ,, YTD Value
1 ,, A ,, 007.2015 ,, 7
1 ,, A ,, 008.2015 ,, 8
2 ,, B ,, 007.2015 ,, 7
2 ,, B ,, 008.2015 ,, 8
3 ,, B ,, 008.2015 ,, 1
4 ,, C ,, 007.2015 ,, 14
5 ,, C ,, 007.2015 ,, 7
4 ,, C ,, 008.2015 ,, 16
5 ,, C ,, 008.2015 ,, 8
5 ,, D ,, 008.2015 ,, 2
Output table:
Company ,, Period ,, MTD Value
A ,, 008.2015 ,, 1
B ,, 008.2015 ,, 2
C ,, 008.2015 ,, 3
D ,, 008.2015 ,, 2