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

How to Create Weekly Groups starting Wednesday 1

Status
Not open for further replies.

mwake

Programmer
Feb 12, 2004
151
US
I'm using CR10 and trying to recreate an excel graph which has a weekly running total of new subscribers. The key dates are Wednesdays (3/30, 3/23, etc). How do I create this grouping in Crystal, so I can summarize and graph the running total??
 
Create a formula like this to group on:

//@Wed_Week
if dayofweek({table.date}) in [4 to 7] then
{table.date} - (dayofweek({table.date})-4)
else
{table.date} - (dayofweek({table.date})+3)

You can group on this, and then create your summaried, and then create a chart off of that.


~Brian
 
You could also use the following for your group field:

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

-LB
 
That's just what I needed!!

Thanks Brian!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top