john-bodley opened a new issue #4898: Pivot Table aggregate function invalid for a number of aggregate functions URL: https://github.com/apache/incubator-superset/issues/4898 Make sure these boxes are checked before submitting your issue - thank you! - [x] I have checked the superset logs for python stacktraces and included it here as text if 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 ### Superset version 0.23.0dev ### Expected results The aggregate function seems to be applied post aggregate of the grouping and thus computing numerous metrics are invalid leading to misleading results. For example summing of group percentages is invalid. The correct logic needs to be computed by the engine without the grouping representing the overall aggregate, i.e., given the metric values `[1/2, 1/4]` the sum of the metrics is `3/4` as whereas the value should be `(1 + 1)/( 2 + 4) = 1/3`. ### Actual results  ### Steps to reproduce 1. Define a metric which computes a ratio. 2. Choose a grouping 3. Select `sum` as the aggregate function
---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] With regards, Apache Git Services
