Need multiple date filters in slice
Make sure these boxes are checked before submitting your issue - thank you!
- [*] I have checked the superset logs for python stacktraces and included it here as text if any
- [*] I have reproduced the issue with at least the latest released version of superset
- [*] I have checked the issue tracker for the same issue and I haven't found one similar
Superset version
0.20.4
Expected results
When I try to create a slice and I have more than one Date columns, I need to specify multiple 'Time Column'. Also I need multiple date filters in the slice. According to the number of date columns, I need more number of date filters.
Actual results
Now only one 'Time Column' and only one date filter is possible even if more than one date columns are available in the table.
Steps to reproduce
- Create new slice
- specify the 'Time Column'
- Able to filter the data only by using the selected data column.
- Only one 'since' and 'until' available. I need More than one according to the number of date columns.
Any workaround for this or plan to solve it.
Seems like a not so common use case, and can be worked around easily with the common filters and/or the WHERE clause.
@mistercrunch thanks for the response, highly appreciated. I tried to use two filters for different time dimensions (system start date, complaint date). Only one works because in all the slices we have the option to provide only 1 time related form attribute, which can either be system start date or complaint date in my case. If I use a normal filter then I can't use last year, last 1 month etc. How you will solve such a use case.
@sanoopmm are you able to find any workaround.
@sanoopmm @mistercrunch I was able to achieve a workaround by creating a calculated column to know the current year (value = 1) and rest period (value = 0) and then using these two values in the filter slice. calculated column = date_field >= DATE_SUB(NOW(),INTERVAL 1 YEAR)
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 .pinned to prevent stale bot from closing the issue.
Please do not close. Bi-temporal tables are fairly common, in my eyes. Like, e.g. event date vs ingest date. Or production date vs date of failure of products.
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 .pinned to prevent stale bot from closing the issue.
Up. There's a common case - cohort analysis - e.g. having a table of events (thus event_date time dimension) with a "cohort_date" (another time dimension) column per event row showing the cohort date of the user we have event for. So 2 time dims and of course it would be highly desirable to have an ability to use dynamic UI time filters for bother of them - so to be able to say - show me events happened withing a time range for a cohort of users of April'2018.
Please advise on any meaningful workaround.
Any updates ?
So is not possible?
We have also main uses cases in which we need two timing filters, one for the daily trends and another for a dimension of the data (like order date, release date...) We have also some cases in which we need more than two, for example to analyse the status of requests that have multiple states. Please advice on a workaround.
Hi @itziarmj I'm working on the PR, I will resolve this case.
Since the fantastic work by @zhaoyongjie has merged, I'm going to call this issue closed. Please turn on the GENERIC_CHART_AXES feature if you need this feature. This flag will be deprecated/removed in a forthcoming major version of Superset, so you can consider this one completed, in beta, and on the road to being in everyone's hands.