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

How to group by 1st Monday, 2nd Monday etc 1

Status
Not open for further replies.

gallobask

Technical User
Jun 25, 2009
48
US
I have a report that sorts by DOW and then by date. How can I get a grouping to sort so that the first Mondays etc. are together?

Example:
now would like
Monday 1st Monday
10/5 10/5
10/12 11/2
10/19
10/26 2nd Monday
11/2 10/12
11/9 11/9
11/16
11/23 Etc........

Any suggestions?
Thank You!!!!
 
Insert a group#1 on DOW and then insert a second group on {@weekbyday}:
if day({table.date}) in 1 to 7 then
"Week 1" else
if day({table.date}) in 8 to 14 then
"Week 2" else
if day({table.date}) in 15 to 21 then
"Week 3" else
if day({table.date}) in 22 to 28 then
"Week 4" else
if day({table.date}) >= 29 then
"Week 5"

-LB
 
Thank you! It worked like a charm! This will save me from downloading and sorting in excel!!! It is such a simple formula but I honestly had no idea how to use that day function!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top