Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Period Of Association Problem

Status
Not open for further replies.

ashark

Programmer
Nov 21, 2002
31
IN
I have Sales Data and have to find the 'Period' the Customers are Associated with the Company.
Data is as follows :

Customer1 01/01/2001
02/10/2001
01/11/2001
06/24/2002
12/25/2002

Customer2 03/01/2001
09/24/2002

I have to find the DateDiff of the first Date and Last Date.
But the a Customer can have many Lines of Data.
How can this be done?
How can I find the first Date and the Last Date and find its Difference?

 
Group by Customer, then write a formula like this and place it in the group footer:

Datediff("d",Minimum({YourDateField},{Customer}),maximum({YourDateField},{customer}))

This will return the number of days difference between the minimum and maximum date for each customer. If you want something other than days, check out the help files for the various arguments you can use rather than "d" for days. Software Sales, Training and Support for Macola, Crystal Reports and Goldmine
dgilsdorf@mchsi.com
 
Hi dgillz
Thankyou very much.
It helped.

Regards,
ashark
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top