You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by "j-a-a-p (via GitHub)" <gi...@apache.org> on 2023/06/06 13:50:42 UTC

[GitHub] [superset] j-a-a-p opened a new issue, #24300: Logical issue: filter on range filters on Seconds level, while chart grain is set to Day leading to wrong chart info

j-a-a-p opened a new issue, #24300:
URL: https://github.com/apache/superset/issues/24300

   In the custom fillter of the bar chart, Days get translated to Seconds. For a chart set to Seconds time grain, perhaps a line chart, this would be OK, but a chart that aggregates to a courser time grain, this will lead to faulty data.
   
   Below the screenshot of the filter. The setting is on Day level, but it can be seen already that a seconds level value will be used. '7 days before'. actually means '604,800 seconds before'.
   <img width="600" alt="image" src="https://github.com/apache/superset/assets/97532277/b3106167-6a98-4d04-a2c5-6be133792a0b">
   
   In the screenshot below you can see the ramnifications. On a day-level aggregated bar chart the value of the first column is not correct.
   
   #### How to reproduce the bug
   
   1. Creating a bar chart based on time based, transactional data set
   2. Set Time Grain to Day
   3. Add a Custom filter on the time, set it to between 7 days before, and Now. (See also screenshot above)
   4. Bug: Notice that the first column will show a decreasing value during the course of the day.
   
   ### Expected results
   For a chart that is set to a certain time grain, make the filter obey this setting.
   Or
   Obey the granularity of the filter. If it is set to Days before, go back only that in days. If set in Hours, Seconds, go back to that level of granularity
   
   ### Actual results
   Customer filer always gets translated to the lowest granularity level.
   
   #### Screenshots
   Chart at 13:30.
   <img width="608" alt="image" src="https://github.com/apache/superset/assets/97532277/4db19c52-700f-4b2d-9c1c-ef37c1bcd403">
   
   Same chart 2 hours later.
   <img width="612" alt="image" src="https://github.com/apache/superset/assets/97532277/d4729e38-3fe6-41d9-b213-3d1db92acc19">
   
   ### Environment
   Mac, Chrome
   
   ### Checklist
   - [ ] I have checked the superset logs for python stacktraces and included it here as text if there are any.
   - [X] I have reproduced the issue with at least the latest released version of superset.
   - [X] I have checked the issue tracker for the same issue and I haven't found one similar.


-- 
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: notifications-unsubscribe@superset.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] j-a-a-p commented on issue #24300: Logical issue: filter on range filters on Seconds level, while chart grain is set to Day leading to wrong chart info

Posted by "j-a-a-p (via GitHub)" <gi...@apache.org>.
j-a-a-p commented on issue #24300:
URL: https://github.com/apache/superset/issues/24300#issuecomment-1588882140

   Used Midnight before, but that sets to last midnight filtering the data of today.


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Logical issue: filter on range filters on Seconds level, while chart grain is set to Day leading to wrong chart info [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas commented on issue #24300:
URL: https://github.com/apache/superset/issues/24300#issuecomment-1972134152

   I can see your point... Today would be a nice add-on, and we'd be open to a PR if you want to add that. But it's more of a feature request than a bug.
   
   For your use case, you can use the Advanced time range editor, and do something like this:
   
   <img width="587" alt="image" src="https://github.com/apache/superset/assets/812905/38f94b11-bf95-4ac8-bf39-374bfebc9a56">
   
   Hopefully that suffices to close this, but let us know if you think it warrants reopening.
   


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


[GitHub] [superset] sfirke commented on issue #24300: Logical issue: filter on range filters on Seconds level, while chart grain is set to Day leading to wrong chart info

Posted by "sfirke (via GitHub)" <gi...@apache.org>.
sfirke commented on issue #24300:
URL: https://github.com/apache/superset/issues/24300#issuecomment-1587613779

   I believe there's an option "Midnight" instead of "Now" - does choosing that cause the behavior you're seeking?


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org


Re: [I] Logical issue: filter on range filters on Seconds level, while chart grain is set to Day leading to wrong chart info [superset]

Posted by "rusackas (via GitHub)" <gi...@apache.org>.
rusackas closed issue #24300: Logical issue: filter on range filters on Seconds level, while chart grain is set to Day leading to wrong chart info
URL: https://github.com/apache/superset/issues/24300


-- 
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: notifications-unsubscribe@superset.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@superset.apache.org
For additional commands, e-mail: notifications-help@superset.apache.org