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

Grouping days of the week

Status
Not open for further replies.

dannyb29

Technical User
Nov 10, 2010
90
GB
Hi there!
Would someone be able to help me with a formula that will enable me to group days of the week for use in a sales crosstab report.
The column display also needs to be the word, "Monday,Tuesday..>"

The date field is as follows: {ProductsSold.ActionDateTime}

Many Thanks in advance
 
I've worked it out!
Thanks!
As a side question would it be possible to help me with creating a parameter where the user can select multiple days of the week, depending on what days they would like to analyse.

Many Thanks in sdvance
D
 
Create a number parameter {?DayofWeek} that is set to allow multiple values. Add values 1 to 7 and add a description to each (Monday, Tuesday, etc.). Set the display to "Description Only". Then add a record selection formula like this:

{ProductsSold.ActionDateTime} in {?DayofWeek}

-LB
 
Thank you for this IBass. I forgot to say that I am also using {ProductsSold.ActionDateTime} for the user to specify a date range. How do I encorporate both elements as the record selection only allows me to use one field once.
Here is my date range record selection formula:
{ProductsSold.ActionDateTime} in {?Start Date} to {?End Date}

Many Thanks
 
My formula was incorrect. However, you CAN reference a field more than once. Go to report->selection formula->record and enter it there (bypass the selection expert):

It should have been:

dayofweek({ProductsSold.ActionDateTime}) in {?DayofWeek} and
{ProductsSold.ActionDateTime} in {?Start Date} to {?End Date}

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top