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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Week and Month Summary

Status
Not open for further replies.
Jun 17, 2010
58
US
I've searched through a few of the threads and was unable to come up with a solution other than partial here and there solutions with regards to this. Thus, I am creating a thread that I hope the senior guys here can help for everyone in the future to review

I would like to create a formula that would summarize the weekly stats Mon-Sun for the last 365 days.

I would like to create a formula that would summarize the monthly stats (could contain partial weekly data) for the last 365 days.

For the sake of my particular equations, I am working with {contact2.udaterecd} for the date received "date table" that will be referenced for the summation of information. udaterecd does not have "data" for every single day (especially Saturday and Sunday) MSSQL 2008 shows the field with data as follows:

2002-03-05 00:00:00.000
 
Utilizing the Insert Summary option, you can choose weekly and monthly within the selection. The problem that I am having is summarizing the fields using the count feature has 170 pages with the data on random pages. I want to have this all displayed into a one page summary.
 
I think you could just use a record selection formula like this:

{table.date} in currentdate-365 to currentdate-1

Then insert a crosstab in report footer that uses {@week} as a row, and count of some recurring field as the summary, where {@week} is:

{table.date}-dayofweek({table.date},crMonday)+1

For the month summary, insert a crosstab next to the first one and use {table.date} as the row->group options->print on change of month.

Suppress all other report sections.

-LB
 
I would like to create a formula that would summarize the weekly stats Mon-Sun for the last 365 days. "

Hi,

Sorry if I've missed something but...

Insert a group on {contact2.udaterecd} and from "the section will be printed", select "For Each Week". That groups your data by week Sunday to Saturday.

Then use select expert, {contact2.udaterecd} is greater than or equal to currentdate - 365
It would look like this in the formula editor:{contact2.udaterecd} >= currentdate -365

As I say, I may have missed a vital piece of the picture...Sorry if I have.
Best regards...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top