Grouping Many Different Dates

Aug 1, 2006

I have a query which has many sums and counts on things like "Company name", "region name" and "Development Name".

I'm using this query for a report to do lots of percentages with, but now i need to filter this also by a date period.

So the user choses "Alex Homes" as the company name and then "July 2006" as the reporting month, and i need all the sums and counts to stay the same and only count/sum the records in the chosen month.

I can't seem to think of a way to do this.

If you need more info then ask.

View Replies


ADVERTISEMENT

Grouping Dates Into Weeks?

May 8, 2005

Hello, I am new to Access and I am having a problem with something. I have a query which returns, among other things, dates. I need to organize (group) the dates into weeks. Does Access have a function which could do this? Or some other way of grouping the dates? Or How would I got about writing a function in Access?
This is done in a Pivot Table right now, and I just use a calculated field which is the date / 7. This gives some god awful numbers (like 5944), and not anything like what I want. I would want the function to return something like,
"Feb. 5, 2005 - Feb. 12, 2005". Any suggestions?

View 2 Replies View Related

Grouping Columns With Dates?

Apr 8, 2012

I am working on a very large table that i have to group by Min & Max Dates.

ColumnA ColumnB
1-Jan Melbourne
2-Jan Melbourne
3-Jan Melbourne
4-Jan Melbourne
5-Jan Sydney
6-Jan Sydney
7-Jan Sydney
8-Jan Sydney
9-Jan Sydney
10-Jan Sydney
11-Jan Sydney
12-Jan Melbourne
13-Jan Melbourne
14-Jan Melbourne
15-Jan Melbourne

I want the above table to provide an output as below:

Min Max City
1-Jan 4-Jan Melbourne
5-Jan 11-Jan Sydney
12-Jan 15-Jan Melbourne

i have done this in excel by sorting dates and then comparing values in Column B.

View 6 Replies View Related

DLookUp, Dates And Grouping Data

Jun 10, 2007

Hello!

Is it possible to group data in form from table within two dates with aggregate function DLookUp,

Thanx

View 1 Replies View Related

Forms :: Dates As Column Headers To Update Table With Dates As Rows

May 12, 2014

Any way to have a form with Dates as column headers to update a table where the dates are stored in rows???

The table set up is like this:
tblOpHdr
DiaryID (PK) - OpDate (Date)

tblOpDetail
DiaryID (FK) - CostCode - MachineNumber - MachineHours - etc

I'm just wondering if there's any way I can do this with a datasheet or a crosstab type setup?

It's Access 2010.

View 1 Replies View Related

Queries :: Calculate Expiry Dates Of Training Courses - Due Dates Not Shown

Aug 28, 2013

I have built a query to calculate the expiry dates of training courses but I am trying to input a criteria so that only dates within 90 days of todays date show. I am using Date()<90 but it doesn't return the correct information. What the criteria should be for this?

View 1 Replies View Related

Queries :: Access 2007 - Select All Dates Between Two Dates?

Apr 9, 2015

I have a table of records, which has within it two date fields (effectively, a 'start' and 'end' date for that particular record)

I now need to create a query to perform a calculation for each date between the 'start' date and the 'end' date

So the first step (as I see it anyway) is to try to create a query which will give me each date between the two reference dates, in the hope that I can then JOIN that onto another query to perform the necessary calculation for each of the returned dates.

Is there a way to do this?

So basically, if for a particular record, the 'start' date is 01-Apr-2015 and the 'end' date is 09-Apr-2015, can I produce a dataset of 9 records as follows :01-Apr-2015

02-Apr-2015
03-Apr-2015
04-Apr-2015
05-Apr-2015
06-Apr-2015
07-Apr-2015
08-Apr-2015
09-Apr-2015

(The *obvious* solution would be to create a separate table of dates, from which I could just SELECT DISTINCT <Date> Between #04/01/2015# And #04/09/2015# - but that seems like a dreadful waste of space, if that table is only required to generate the above? And it would have to cover all possible options; so it would either have to be massive, and contain every possible date - ever! - or maintained, adding new dates as necessary when they are required. Seems horribly inefficient!)

Is it possible to just select each date between the two reference dates? Or can you only query something which exists somewhere in a table?

View 4 Replies View Related

Subtracting Dates From Adjacent Dates In Same Column

Sep 7, 2006

Hiya-

I have a database with 5000 entries, corresponding to about 10 entries for about 500 people. Each of the entries is dated, and I need to calculate the time intervals between each person's sequential entries in the table.

One way of doing this is to create another column that contains the date of the previous entry. I can then use DateDiff to subtract one date from the other and give me the difference in days.

This approach falls down if I then work with only a subset of the entries - I would have to re-enter the previous entry dates as the time intervals would have changed.

What I really need is a way of subtracting the date from the date in the cell directly above it. Will Access let me do this, or is there a better way?

Many thanks, Jules.

View 3 Replies View Related

Queries :: Count Dates Between Dates In Two Tables

Jul 8, 2014

I have two tables with dates. Between (!) every two following dates in table1, I want to know the number of dates in table2. How do I write an SQL query for this? The tables I have are up to a few hundred records in table 1 and a few thousand records in table2. So to prevent that this takes hours I need a fast query.

To explain the query I need, for example:
table1
01/01/2014
15/01/2014
17/01/2014
30/01/2014

table2
01/01/2014
02/01/2014
05/01/2014
17/01/2014
18/01/2014
20/01/2014
21/01/2014
25/01/2014

So the answer of the query would be 2,0,4.

Explanation:
Between 01/01/2014 and 15/01/2014 in table 1 there are 2 dates in table2 (01/01/2014 is not included between the dates)
Between 15/01/2014 and 17/01/2014 in table 1 there are 0 dates in table 2
Between 17/01/2014 and 30/01/2014 in table 1 there are 4 dates in table 2

View 2 Replies View Related

Summing Data Between Two Dates (When Dates Are Different Per Record)

Nov 15, 2011

I have a master table which shows all transactions per record (person) over a financial year.

Each record person has a seperate package period over which their spend needs to be measured. Therefore although I have all their transactions for the year, I only want to sum their transactions between their given [start date] and [end date] which are in columns.

I need to be able to create a field which sums all expenditure per record between the start and end dates

Name Start Date End Date Invoice Date Amount

Matt 15/5/11 15/9/11 1/11/11 £100
Matt 15/5/11 15/9/11 7/7/11 £200
Matt 15/5/11 15/9/11 12/12/11 £200

In this case I would only want to sum 7/7/11 as this is between the start and end dates

I want to write something like sumif([Invoice Date] is between [start date] and [end date] - not sure where or how exactly

(The start date and end date will always be the same per person)

Is this possible in access?

View 10 Replies View Related

Grouping

May 2, 2006

I have created an invoicing system for a CD shop
There is a transaction table which has each individual cd sold as a seperate transaction. Each transaction has an order number, so there can be more then one cd sold per order, but they all still have their own record in the table.

im now invoicing each order by mail merge based on a query that finds all the details on every transaction but wht ive found is that the mail merge puts each transaction onto a different page even if its from the same order number as another.

does anyone know how to group each order in the query so that all the items in one order come in a single invoice?

View 3 Replies View Related

Grouping

Jun 21, 2005

Hi, I have a query which numerous fields, and I need to make a report based on the query. However I need to group 3 fields in the query and press the sum button on 2 of them, Qty and Total Price (which is qty*price)

I need to do this so in the report when a particular wine is purchased more than once, instead of repeating the peoples name who bought the wine, it will only show 1 and automatically add the rest to the total price.

I dont know how to group within a query, can someome please tell me how? Thanks.

View 1 Replies View Related

Grouping

Jul 6, 2005

Hi to all;
I have one code of 6 digits; each digit refer to a group; first 2= product group; beverage; live animals,….itc (24 product groups), the 3ed digits= food product, the 4th-6th digit= detail product group; vegetables, fruits,….,the rest of digits refers to product name, carrot, apple,…itc , example 070511
How can I use the query to sum the product value at different group level; example the first 2= product group, ..?
Do I have to split my code to 6 cods to do my calculation?
Thank in advance for help
majed

View 1 Replies View Related

Grouping

May 2, 2006

I have created an invoicing system for a CD shop
There is a transaction table which has each individual cd sold as a seperate transaction. Each transaction has an order number, so there can be more then one cd sold per order, but they all still have their own record in the table.

im now invoicing each order by mail merge based on a query that finds all the details on every transaction but wht ive found is that the mail merge puts each transaction onto a different page even if its from the same order number as another.

does anyone know how to group each order in the query so that all the items in one order come in a single invoice?

View 7 Replies View Related

Grouping %age

Sep 21, 2004

Hi all
I am trying to find a way of finding the number of a group of sessions as a percentage figure. e.g. total number of clients attending 1-3 sessions = 20%, 4-6 =15%, 7-12 =21% 1-2years = 8%, etc. and entering this calculation in a report.hope you can help.
Dave

View 9 Replies View Related

Grouping

Jul 18, 2005

Question on grouping within Access Reports:
A simplistic view of the report I'm trying to generate is as such:

Company Name - Company Description - Employee

I am grouping by Company name, and I am hiding duplicates of Company Description because they can be long. I also have the Company Description as Allowing to Grow.

The problem is that the first record gives the company, the description, and the employee name on the first line just fine, but the second employee name won't be listed until the Company description ends. When the description is about a paragraph long, the other employees look very seperated from the initial record.

Any way to fix this?

View 1 Replies View Related

Grouping Objects

Mar 9, 2008

Hi,

can form objects be grouped? i currently have numerous buttons on a form that are shown according to a button selection. my current code makes all buttons visible / invisible singularly but i wiondered if they could be grouped/ named and the get the code to make the group visible / invisible?

many thanks,

NS

View 4 Replies View Related

Change Grouping

Sep 19, 2005

Can you help me.

I have about 2000 records with Part Number XXXCOGxxxxx. This Should be C0G. Ex:

SPN
RPE122COG101K
RPE122COG681K
RPE122COG101K
RPE122COG681K
GRM40COG100J
GRM40COG100K
GRM40COG101J
GRM40COG150J
GRM40COG220J
GRM40COG221J
GRM40COG271J
GRM40COG470J
GRM40COG471J
GRM42-6 COG100J
GRM42-6COG220J
GRM42-6COG472J

What to write a query to change just the COG portion. Can you tell me the formula?

Thanks
Chris

View 1 Replies View Related

Grouping Time

Oct 23, 2005

I am trying to group time entries so that I can say, between 8AM and 10AM there were this number of calls. I have a field called Time_Assigned with numberous time entries (such as 08:15:33 AM) corresponding to another field called Incident_Type (such as medical). The data spans a whole year so I have several thousand time entries and I would like to show how many incident types occur between such and such hours. Thanks again for everyone's generous help.

View 2 Replies View Related

Grouping Numbers

Dec 6, 2005

Hi,

I would like to know how i can group numbers into bands.

e.g

Col 1

1
2
3
4
5
6

How do I group the above into groups of i.e. 1 - 3 and 4 - 6, or group in regular intervals like 1-2, 3-4, 5-6?

Regards

View 3 Replies View Related

Grouping With Particular Records At The Top

Feb 24, 2006

Hi all,
I have a db for logging meeting action points. Each action point has a description and owner. I'd like a query/report which will produce a list of action points grouped by owner (easy), but with a particular owner's action points at the top.

Essentially, rather than do a GroupBy and ascending sort, i need to specify the first group that is displayed. I don't care in what order the other groups appear.

Eg.

Action Point Owner
1. Task 1 DC
6. Task 6 DC
8. Task 8 DC
3. Task 3 AG
4. Task 4 AG

So, above if i just did an ascending sort, the DC records wouldn't be at the top.

any ideas?

El.

View 3 Replies View Related

Grouping Data

May 16, 2006

How do i group the following records

ID Surname Pack
29679Minican 1
29679Minican 2
27818Oliver 1
27818Oliver 2
27818Oliver 3

so its will show ...

27818Oliver
29679Minican

... on a spreadsheet

View 1 Replies View Related

Grouping Of Data

Jul 6, 2006

I have a table which stores meeting room booking information in half hour slots.
If someone books a 2 hour meeting then 4 records would be produced – one for each half hour. I want to produce a query which will group the data by room (ScheduleID) showing the max and min times (ie the initial start time and final end time) for each event and the event details. The table structure is as follows

ScheduleDetailsID, ScheduleID, CustomerID, ScheduleStartTime, ScheduleEndTime, meeting purpose

And the query I have tried is as follows:

SELECT [Schedule Details].ScheduleDetailsID, [Schedule Details].ScheduleID, [Schedule Details].CustomerID, Min([Schedule Details].ScheduleStartTime) AS MinOfScheduleStartTime, Max([Schedule Details].ScheduleEndTime) AS MaxOfScheduleEndTime, [Schedule Details].[meeting purpose]
FROM [Schedule Details]
GROUP BY [Schedule Details].ScheduleDetailsID, [Schedule Details].ScheduleID, [Schedule Details].CustomerID, [Schedule Details].[meeting purpose];

Can anyone tell me where I have gone wrong. It does not group the data as I want it to ie by room, then time, with only the initial start and final end times. Thanks in advance. Peter

View 3 Replies View Related

Grouping COUNT() Help

Oct 10, 2006

I have a set of evaluation response data. There are a number of question (like 20), and each respondent answered the question on a scale of 1 to 5. Thus I have a table Responses where each column is a question and each row is a Respondent's answers. Each cell has a value between 1 and 5 (inclusive), or is possibly NULL.

What I want is to be able to list out the number of people who responded with a certain evaluation for each question. So it would list the number of people who gave a 1, a 2, a 3, and so on for each question. So I'd get something like:

---------Q1 Q2 Q3 Q4 Q5 ...
-1- x x x x x ...
-2- x x x x x ...
-3- x x x x x ...
-4- x x x x x ...
-5- x x x x x ...


Ideally I'd like the questions to be on the rows and the numbers as columns, but I can just do the transposition when I make this as a report.

Any ideas of a SQL Query that will get me such a table? I'd really like to avoid VBA if possible (I'm writing this database to be used/maintained by a non-programmer), and I'd like to not have to develop like 20 different subreports in order to print out this information.

Thanks.

View 6 Replies View Related

Problem With Grouping

Jan 8, 2007

I am having a problem that I hope has a very simple solution that I am somehow overlooking.

I have simplified my query for the purposes of this question. I have a query that only get the date and amount of a transaction. I want to group the information by date and have the transaction amount summed. For some reason it will not group by date.

Here is my query displayed in SQL:
SELECT Transactions.Date, Sum(Transactions.TransTotal) AS SumOfTransTotal
FROM Transactions
GROUP BY Transactions.Date
ORDER BY Transactions.Date;

And here is a sample of the data returned:
DateSumOfTransTotal
12/13/20055.12
12/13/20055.12
12/13/20055.12
12/13/20055.12
12/15/20051.15
12/15/20051
12/15/20050.12
12/15/20056.56
12/16/200519.14
12/16/200512
12/16/20058.16
12/17/200511.11

Why will it not group all the 12/13 or 12/15's together? I have done other queries like this and not had this problem. What am I overlooking?

Any help is very much appreciated. Thanks,

View 13 Replies View Related

Date Grouping

Jul 31, 2007

Hi

I have this table

date, error code, user

i need the output to be :
User, Error Code, Month/Week1 Count of error code, Month/Week2 Count of error code .....

basically how do i make error code field as count with each week 1-4 for the month?

Format([AuditDate],"mm-ww") create week but in 1-52 weeks not 1-4 for the month. Also need something like ' count if week = 1'

Hope this makes sense.

Thanks

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved