-
Notifications
You must be signed in to change notification settings - Fork 14.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Time grain (week) starts from Sunday #971
Comments
@mahedi0244 nice finding! Is this on the python or js side? maybe we can have do it based on the locale? |
@xrmx this is the part that I had to change and it seems like working |
@mahedi0244 so it looks like that just removing the Also note to self: this is db specific |
@xrmx DATE_SUB(created_at, INTERVAL DAYOFWEEK(created_at) - 1 DAY) —> will subtract days in such a way so it returns the previous Sunday If I just replace "DAYOFWEEK(created_at) - 1 DAY" with “WEEKDAY(created_at) - 0 DAY” , the week will start on Monday, as WEEKDAY(created_at) returns 0 for Monday, 1 for Sunday and so on. |
@mahedi0244 thanks for the explanation! but why |
@xrmx “WEEKDAY(created_at) DAY” will also work |
Just add a new grain "week (starting Monday)". You then need to re-label the current one to "week (starting sunday)" |
I've been using superset for a while, just wondering if there is a feature on the dashboard that can alter time grain as we desired? I mean the time grain config is the best, just wondering if we can also change it on dashboard view for various users. |
Notice: this issue has been closed because it has been inactive for 438 days. Feel free to comment and request for this issue to be reopened. |
@mistercrunch could you please reopen this? |
I need this feature too |
We have this for some database, it's just a matter of adding the proper expression for your database engine. Here's how it's done on Presto: Which engine are you all interested in? Note that the key used in the |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. For admin, please label this issue |
I am using caravel for a while and when I add a slice where the visualization type is "Time Series", I noticed that the week starts from Sunday by default. It can be changed easily to start the week on Monday, instead of Sunday. Is the caravel community thinking about adding a feature to select the start date or I can change it to Monday by default if you suggest.
The text was updated successfully, but these errors were encountered: