2 Replies Latest reply on Jan 29, 2015 6:24 PM by DavidJaffa

# Seperating Weekdays from Week Ends in Reporitng

### Title

Seperating Weekdays from Week Ends in Reporitng

### Post

Hi,

I have a report that shows Employees with their hours worked throughout the week grouped by employee name and a total at the end for each employee. I would like to only show Monday - Friday with a sub total and then Saturday-Sunday with a sub total and then the total at the end.

How do I go about grouping Monday to Friday and then Saturday & Sunday?

Thanks

• ###### 1. Re: Seperating Weekdays from Week Ends in Reporitng

Add a calculation field that returns one value for Monday to Friday dates and a different value for Saturday, Sunday dates.

Example:

Let ( Dw = DayOfWeek ( YourDateFieldHere ) ;
Choose  ( Dw ; 0 ; 2 ; 1 ; 1 ; 1 ; 1 ; 1 ; 2 )
)

You can now set up a sub summary layout part with this calculation field as the Break or "when sorted by field" and include this field in your sort order. A summary field in the sub summary layout part will show one sub total for the week days and one for the week end.

PS, there are quite a few different calcs that might be used here. In this version, the DayOfWeek function returns 1 = Sunday, 2 = Monday and so forth. Choose insists on a value to return for a zero index os the 0 shown is just a place holder to get the right results for the values returned by the DayOfWeek function.

• ###### 2. Re: Seperating Weekdays from Week Ends in Reporitng

If you lived local to me I'd buy you a beer. Thanks for all the help over the past couple days. Your example above has helped me in more ways than one.

Cheers