apache / superset

Apache Superset is a Data Visualization and Data Exploration Platform

Home Page:https://superset.apache.org/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pivot Table v2, can't show subtotals based on a single column

RavazziniAndrea opened this issue · comments

In the example shown in the picture, I'm extracting prices (column 'Importo') and a delta %. When showing subtotals, I need the sum of prices, but when selecting SUM as aggregate function, it calculates even the sum of the delta, that doesn't make sense.

Is it possible to aggregate on a single column? Even leaving other values empty and showing only the one associated to the aggregate function

Screenshots

image

Trying to make sure I understand the issue/request. It looks like the subtotals are indeed summing/aggregating the values correctly. However, while it's GOOD that you're getting a SUM of the pricing, it's BAD that you're getting a SUM of the delta, and you'd... rather not show that aggregation? Trying to get a sense of what you DO expect to see in that red box, and how you would expect the plugin/controls to support that.

Yes, it's how you said. The sum of pricing is good and the sum of the delta doesn't make sense..
In my opinion, if there was the possibility to aggregate on a single set of column (in this case the sum of pricing), the other columns in the subtotal can even be left empty.
In my case specifically, the red box can be left empty because the value that I have to see in the subtotal is the sum of prices.

Thanks for the response!

Hmmm... to do what you ask here would mean either building a dynamic control panel section with display options for each metric you've added (kind of like the "Customize Columns section of the Table controls, pictured below), or additional (chart-specific) options for each item in the Metrics control. I don't think we have plans to do either right now, bur if you're passionate about this, you might want to look at how the Table controls are built and consider opening a PR based on that if you're interested in contributing to the codebase.

image

Even I would like to have this feature in superset!

I support this issue. The same problem - I don't need total sum where there is % sign in metric column and there isn't possibility to cancel total sum for specific columns. However, for column as shipment or plan (without % sign) it's ok to sum each month result for annual total.

Addition: is it possible to bold pivot table borders? maybe is there issue on this topic?
Thanks
Screenshot_20231114_104709

This issue has been quiet for quite a while, so I'll close it in favor of #23560, which links to the other similar reported issues. This thread still has a lot of useful context, so thank you for reporting it here and I hope it serves in helping someone tackle the problem. To say what everyone says in open source, contributions welcome/encouraged!