MySQL Forums
Forum List  »  Newbie

Re: Custom Defined Week/Date Range Help
Posted by: Andrew Leonard
Date: January 31, 2017 03:33PM

I understand where your coming from in regards to normalizing the sum... But for what we are doing and looking for I have the data output grouped and totaled by each rep for the week.

i.e.
Name - Sales - Scheduled - Avg $
Joe - 10 - 9 - $1000
John - 8 - 8 - $1250
Judy - 6 - 4 - $750


What I'm really looking for is a way to be able to write a logical statement for my company's work week that I can just set and forget about... not the current rolling 7 day period.

For example:
Use our company's work week of Friday to Thursday. Assuming it's this week, the sale_date range would need to be from 1/27/2017 (Friday) to 2/2/2017 (Thursday). Currently I have just a rolling 7 day period which is displaying 1/25/17 (the previous Wednesday) to 1/31/17 (today). While that gives me what I'm sort of looking for in regards to production over a week, our sales managers want to see week to date production for a "Sales Week" in regards to our company's work week.

Is there any logic I could write that would make the date range always be the most recently passed Thursday to the upcoming Friday?

Options: ReplyQuote


Subject
Written By
Posted
Re: Custom Defined Week/Date Range Help
January 31, 2017 03:33PM


Sorry, you can't reply to this topic. It has been closed.
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.