A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Return Latest Quarterly and Monthly info.



 
 
Thread Tools Display Modes
  #1  
Old September 16th, 2005, 06:23 PM
spartanmba
external usenet poster
 
Posts: n/a
Default Return Latest Quarterly and Monthly info.

Hello,

I have a table with the follow data:

Store Quarter Month Sales Percent ID
245 2 5 3.5% 110
245 2 6 3% 111
245 2 7 5% 243
245 2 12 8% 249
245 3 7 4.5% 302
245 3 8 4% 303
245 3 12 6% 310

I would like the result set to return this:

Store Quarter Month Sales Percent ID
245 2 5 3.5% 110
245 2 6 3% 111
245 3 7 4.5% 302
245 3 8 4% 303
245 3 12 6% 310

I think I know what the query needs to do, but I have no idea how to
approach it. I am thinking that the query would take an individual record
(id 243 in this case) and see if it is the highest quarterly information in
the table while keeping the store number and month the same. To give a
little more insight, the data in the table is actual and forecasted percents.
For example, record 310 is a forecasted amount during the third quarter for
month 12 which is in the fourth quarter. I would want 310 to appear in my
result set until sometime in the fourth quarter when a data point for month
twelve was added.

Thanks for your help,
John
  #2  
Old September 16th, 2005, 08:57 PM
[MVP] S.Clark
external usenet poster
 
Posts: n/a
Default

What is it about Q2M7 & Q2M12 that should cause it to be excluded from the
output?
(I've crashed a lot of motorcycles, so forgive my cranial density.)

Maybe this website can help: http://www.mvps.org/access/queries/qry0020.htm


--
Steve Clark, Access MVP
FMS, Inc.
Call us for all of your Access Development Needs!
1-888-220-6234

www.fmsinc.com/consulting


"spartanmba" wrote in message
...
Hello,

I have a table with the follow data:

Store Quarter Month Sales Percent ID
245 2 5 3.5% 110
245 2 6 3% 111
245 2 7 5% 243
245 2 12 8% 249
245 3 7 4.5% 302
245 3 8 4% 303
245 3 12 6% 310

I would like the result set to return this:

Store Quarter Month Sales Percent ID
245 2 5 3.5% 110
245 2 6 3% 111
245 3 7 4.5% 302
245 3 8 4% 303
245 3 12 6% 310

I think I know what the query needs to do, but I have no idea how to
approach it. I am thinking that the query would take an individual record
(id 243 in this case) and see if it is the highest quarterly information
in
the table while keeping the store number and month the same. To give a
little more insight, the data in the table is actual and forecasted
percents.
For example, record 310 is a forecasted amount during the third quarter
for
month 12 which is in the fourth quarter. I would want 310 to appear in my
result set until sometime in the fourth quarter when a data point for
month
twelve was added.

Thanks for your help,
John



  #3  
Old September 20th, 2005, 10:15 PM
spartanmba
external usenet poster
 
Posts: n/a
Default

No problem and good question. Q2M7 and Q2M12 would be excluded from the list
if I have information from a quarter greater than 2. So if I have q3m7 then
I would return the information for it and not Q2. Same with Q2M12. If I
have Q3 then I would want it unless I have Q4. The largest quarterly number
for a month is what I would like returned.

Thanks,
John

"[MVP] S.Clark" wrote:

What is it about Q2M7 & Q2M12 that should cause it to be excluded from the
output?
(I've crashed a lot of motorcycles, so forgive my cranial density.)

Maybe this website can help: http://www.mvps.org/access/queries/qry0020.htm


--
Steve Clark, Access MVP
FMS, Inc.
Call us for all of your Access Development Needs!
1-888-220-6234

www.fmsinc.com/consulting


"spartanmba" wrote in message
...
Hello,

I have a table with the follow data:

Store Quarter Month Sales Percent ID
245 2 5 3.5% 110
245 2 6 3% 111
245 2 7 5% 243
245 2 12 8% 249
245 3 7 4.5% 302
245 3 8 4% 303
245 3 12 6% 310

I would like the result set to return this:

Store Quarter Month Sales Percent ID
245 2 5 3.5% 110
245 2 6 3% 111
245 3 7 4.5% 302
245 3 8 4% 303
245 3 12 6% 310

I think I know what the query needs to do, but I have no idea how to
approach it. I am thinking that the query would take an individual record
(id 243 in this case) and see if it is the highest quarterly information
in
the table while keeping the store number and month the same. To give a
little more insight, the data in the table is actual and forecasted
percents.
For example, record 310 is a forecasted amount during the third quarter
for
month 12 which is in the fourth quarter. I would want 310 to appear in my
result set until sometime in the fourth quarter when a data point for
month
twelve was added.

Thanks for your help,
John




 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel - sum a column of sales monthly and quarterly? HarryMangurian Worksheet Functions 1 May 17th, 2005 12:34 AM
Shifting Weeks for Quarterly Reports setoFairfax General Discussion 1 September 8th, 2004 05:43 PM
Figuring totals by periods (Monthly, Quarterly, etc.) Frank Kabel Worksheet Functions 1 June 10th, 2004 12:23 PM


All times are GMT +1. The time now is 05:16 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.