Aggregation in Pivot Table 2 component needs to happen by column and not one type of aggregation for all metrics. #18548
Replies: 5 comments 4 replies
-
@jgarcia-74 I am experiencing the same issue. Did you ever find a workaround or implementation? |
Beta Was this translation helpful? Give feedback.
-
Still familiarizing myself with the codebase where did you implement this? I'll put this on my list of things to make a PR on. Thanks @jgarcia-74 |
Beta Was this translation helpful? Give feedback.
-
Hi! Is there any update on this task status? Will different aggregation be added in pivot v2 without creating any custom plugin? |
Beta Was this translation helpful? Give feedback.
-
Bumping this old discussion. I'm currently scratching my head trying to solve this problem in my Pivot tables. Is there a workaround in current version of Superset (4.0.2+)? For Pivot table there is a mandatory selector that allows to choose aggregation function. But if your rows contain both additive measures and ratios, subtotals and totals kinda break as chosen aggregation function is applied to all the measures at once. Also as far as I see, totals are calculated after the detailed data is gathered from DB. So Pivot can't take advantage of measures definitions while calculating totals. I've found related issue regarding this topic, but it looks like it was left hanging. |
Beta Was this translation helpful? Give feedback.
-
Hi! This is a well-resolved issue in most competitors (PBI, Looker..) and this correction would be very good for all of us! @goldjee , There's an issue related to this issue topic @rusackas you can choose wich thread continue to this problem... thanks! |
Beta Was this translation helpful? Give feedback.
-
A clear and concise description of what the bug is.
We have a combination of sales and percentage metrics in a grid report, which we use grouping functionality. This way, users can drill down from, let's say, Division -> Region -> District, and seeing the Sales and Margin % for each one of those groupings as they drill down. However, currently this component only allows you to specify one type of aggregation for all the metrics in the reports. This clearly is not useful. We need to have Sum aggregation for the sales metrics, and we might want to have the 'average' aggregation for the Margin (percentage) metrics. Currently, we can't display the sum for the percentage metrics, because it just doesn't make sense to do so.
Is this something that is in the roadmap to be fixed? I already modified the current Table component to allow to add hierarchical drilling and aggregation per column, however, there are some other functionality that we would like to use in pivot table 2.
How to reproduce the bug
Create a dataset that you can group by with different levels, have a sales and percentage metrics in the report, and then do the aggregation. You can select only one type of aggregation for all the metrics, instead of specifying the aggregation by column, giving us wrong results.
Expected results
I would like to specify the aggregation by column, so the totals/subtotals by grouping, show the sum for sales metrics and average for percentage metrics, for example.
Actual results
You can only select one aggregation for all metrics, which is wrong.
Environment
(please complete the following information):
superset version: 1.3.2
all browsers
Checklist
Make sure to follow these steps before submitting your issue - thank you!
Additional context
Add any other context about the problem here.
Beta Was this translation helpful? Give feedback.
All reactions