dosubot[bot] commented on issue #40787: URL: https://github.com/apache/superset/issues/40787#issuecomment-4627935953
<!-- Answer --> Hi @linchangyang-sg! I'm [Dosu](https://go.dosu.dev/dosubot) and I'm helping the Apache Superset team. Looking at the current implementation, the Start and End sections intentionally use different grain options — `SINCE_GRAIN_OPTIONS` maps all grains with the label "Before", while `UNTIL_GRAIN_OPTIONS` maps them with "After" [[1]](https://github.com/apache/superset/blob/829e4d92d91ceae4b43b1ed3b063ffe45377799c/superset-frontend/src/explore/components/controls/DateFilterControl/utils/constants.ts#L90-L102). This means: - **Start** only shows: Days Before, Weeks Before, Months Before, etc. - **End** only shows: Days After, Weeks After, Months After, etc. This makes your use case ("from 120 days ago to 1 day ago") impossible to express using the Relative Date/Time mode for the End part, since there's no "Days Before" option there. The screenshot you shared from a previous version suggests both directions were once available in both sections. The current code defines these as separate constant arrays with no overlap, so it would require adding "Before" options to `UNTIL_GRAIN_OPTIONS` (and/or "After" to `SINCE_GRAIN_OPTIONS`) to restore that flexibility. As a workaround, you can use the **Advanced** type with something like `DATEADD(DATETIME("today"), -120, day) : DATEADD(DATETIME("today"), -1, day)` to express "120 days ago to 1 day ago." <!-- Dosu Comment Footer --> *To reply, just mention [@dosu](https://go.dosu.dev/dosubot?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=reply-with-mention&utm_term=apache%2Fsuperset).* --- Docs are dead. Just use [Dosu](https://dosu.dev?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-tagline&utm_term=apache%2Fsuperset). [](https://app.dosu.dev/response-feedback?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-feedback&utm_term=apache%2Fsuperset&message_id=e4a13980-19a6-4a57-bf3f-b9f88c2e3347) [](https://github.dosu.com/apache/superset?utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-ask-repo&utm_term=apache%2Fsuperset) [](https://app.dosu.dev/signup?referrer=openSource&source=github-footer&utm_source=github&utm_medium=bot-comment&utm_campaign=github-comment-footer-20260415&utm_content=static-docs-share-team&utm_term=apache%2Fsuperset) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
