cancel
Showing results for 
Search instead for 
Did you mean: 

Group by Month unless current month then group by week

serenagunter
Explorer
0 Kudos

Hello!

I have a need to group and summarize numbers monthly, unless it is the current month, then it should be grouped weekly, starting the firts of the current month.

I'm stumped.

Crystal Reports 2016 SP9

DellSC
Active Contributor
0 Kudos

Does your week start on Sunday or Monday? Also, do you need future dates or just through the current date?

-Dell

serenagunter
Explorer
0 Kudos

While our week starts on Sunday... in this case it would start on the first of the month. Does that make sense? Only through "today".

serenagunter
Explorer
0 Kudos

I'm still looking for an answer to this, if anyone out there has any ideas.

Accepted Solutions (0)

Answers (1)

Answers (1)

ido_millet
Active Contributor
0 Kudos

Step 1: Create a formula that returns for each record the Month Number and Name ('M1. Jan', 'M2. Feb', etc) unless the record is from the current month, in which case it returns the week number ('W1', 'W2', ...)

Step 2: Group on that formula.