Recently I was putting together a time line graph very similar to the one Google Analytics has, and it occurred to me that I have been reinventing the week every time I faced the same problem. So it is time to record the pattern and hopefully come back to it next time.
So, the problem is very common: User needs to see data for the past month, past year, past week from the current day. What is the best way to set up filters? If using words Month, Week, Year, there is a connotation that it might be THIS YEAR, THIS MONTH, AND THIS WEEK, meaning period starting from Jan. 1, 1st day of current month or current Monday.
In addition we also have a problem of number of days in the month. If today is March 2, what date should we start our 1 Month period.
When does ‘past year” year period begin? March 2 or March 3rd of last year? All those questions have answers of course, but every time I deal with this problem, I have to stop and think a bit. So my solution (given that users do not care for precision all THAT much (and in most cases they don’t anyways) - add filters that say: Past 7 Days | Past 4 Weeks | Past 12 Month |
If more precision required, provide date pickers. See Google Analytics for an excellent one.