Page 1 of 1

Grouping by Week

Posted: Mon Mar 17, 2008 1:04 pm
by iwebcodms
Hello,

Sorry to bother you with such a simple question, but I was hoping someone would be able to point me in the proper direction. I have a report that uses the "Accounting Period Beginning" from and "Ending On" and I want to create a Grouping based upon week. Typically we generate reports every two weeks (so the accounting period is 14 days), but I want running totals for EACH week as well. I need the math/functions to add like 6 days to the BeginPeriod and then test to see if the days fall into this range if so it is given "1st Week" else if it falls inside the second week range it is given "2nd Week" I would like it to be generic enough to work for any period specified (7 days chunks starting from the BeginPeriod.)

Thanks in advance for any guidance!

Dave

Grouping by Week

Posted: Mon Mar 17, 2008 2:39 pm
by Vital
You can use following expression:

Code: Select all

(YourData.Day - 6) < 7 ? "1th week" :
(YourData.Day - 6) < 14 ? "2th week" : 
(YourData.Day - 6) < 21 ? "3th week" : "4th week"
Thank you.

Grouping by Week

Posted: Sat Mar 29, 2008 9:46 pm
by Edward
Please open the attached report in the Demo.exe example application from the standard delivery. There are three possible situations were modeling.

Let us know if any additional help is required.

Thank you.