You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@superset.apache.org by GitBox <gi...@apache.org> on 2021/02/03 03:29:48 UTC
[GitHub] [superset] rwspielman opened a new issue #12907: Total Row for Table Charts
rwspielman opened a new issue #12907:
URL: https://github.com/apache/superset/issues/12907
**Is your feature request related to a problem? Please describe.**
Table charts don't include an option for 'Total' when utilizing group by. There **is** the option to do this in pivot tables, however, the 'All' record just floats around and isn't really useful to quickly glance at from the user's POV.
**Describe the solution you'd like**
A toggle option on table charts that lets the user include a total row. Ideally, the total row will stick to the bottom of the table and be stylized differently than the rest of the table.
**Describe alternatives you've considered**
We tried using the pivot table with the option for a total row - but because it is named 'All' if we sort by the groupby in alphabetical, it will just float in the midst of all the data.
----------------------------------------------------------------
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.
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] villebro commented on issue #12907: [table] Total Row for Table Charts
Posted by GitBox <gi...@apache.org>.
villebro commented on issue #12907:
URL: https://github.com/apache/superset/issues/12907#issuecomment-773857917
@rwspielman now that it has been migrated the table chart to the new chart data endpoint (see #10270), it is finally possible to add a total row to the table chart. The reason this wasn't possible before is because legacy charts were really only able to do single query requests, making it difficult to get both row level data and aggregates for the whole dataset. With the new architecture, it's possible to issue multiple queries to the backend for a single chart rendering. In practice this feature would require issuing a second query to the analytical database, where the groupings have been removed, and only the metrics are present.
@amitmiran137 I know your team has been thinking about working on this functionality. Have you considered how pagination would be taken into account when displaying results? I personally think think
- The total should display the value for all metrics without grouping: if a metric is `AVG(x)`, the total row would display the average for the whole column.
- In addition to showing the aggregate metric values, it would also show total row count.
- The total row would be visible all the time, showing results for ALL rows, not only those visible in the current pagination view.
----------------------------------------------------------------
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.
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] villebro commented on issue #12907: [table] Total Row for Table Charts
Posted by GitBox <gi...@apache.org>.
villebro commented on issue #12907:
URL: https://github.com/apache/superset/issues/12907#issuecomment-773857917
@rwspielman now that it has been migrated the table chart to the new chart data endpoint (see #10270), it is finally possible to add a total row to the table chart. The reason this wasn't possible before is because legacy charts were really only able to do single query requests, making it difficult to get both row level data and aggregates for the whole dataset. With the new architecture, it's possible to issue multiple queries to the backend for a single chart rendering. In practice this feature would require issuing a second query to the analytical database, where the groupings have been removed, and only the metrics are present.
@amitmiran137 I know your team has been thinking about working on this functionality. Have you considered how pagination would be taken into account when displaying results? I personally think think
- The total should display the value for all metrics without grouping: if a metric is `AVG(x)`, the total row would display the average for the whole column.
- In addition to showing the aggregate metric values, it would also show total row count.
- The total row would be visible all the time, showing results for ALL rows, not only those visible in the current pagination view.
----------------------------------------------------------------
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.
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] junlincc edited a comment on issue #12907: [table] Total Row for Table Charts
Posted by GitBox <gi...@apache.org>.
junlincc edited a comment on issue #12907:
URL: https://github.com/apache/superset/issues/12907#issuecomment-773637539
----------------------------------------------------------------
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.
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] rwspielman commented on issue #12907: [table] Total Row for Table Charts
Posted by GitBox <gi...@apache.org>.
rwspielman commented on issue #12907:
URL: https://github.com/apache/superset/issues/12907#issuecomment-773850365
Junlin (@junlincc), confirming that your second screenshot is the end result I'm looking for. We are coming from excel reporting mostly so the parallel in excel looks like this:
<img width="266" alt="Screen Shot 2021-02-05 at 1 04 40 AM" src="https://user-images.githubusercontent.com/20442310/107000837-2c1adc80-674e-11eb-8fe8-70810811b6e9.png">
To opine on your second design consideration of where to add the switch, I think that for the case of `Query Mode: Aggregate` it should be placed in the `Group By` section of the control panel. From a user standpoint, it would be like unioning an additional row where we are grouping by `True` (i.e. `SELECT "Grand Total" as <groupby>, <metrics> FROM <table> GROUP BY True ...`)
Additionally, our use case is for table viz `Query Mode: Aggregate`. For this case, it should carry over the metrics defined in the query section of the control panel and not require the user to define an aggregating function.
----------------------------------------------------------------
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.
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] junlincc commented on issue #12907: [table] Total Row for Table Charts
Posted by GitBox <gi...@apache.org>.
junlincc commented on issue #12907:
URL: https://github.com/apache/superset/issues/12907#issuecomment-773637539
<img width="1402" alt="Screen Shot 2021-02-04 at 2 06 18 PM" src="https://user-images.githubusercontent.com/67837651/106961384-5939a180-66f2-11eb-9c0e-d167aaaf9511.png">
@rwspielman Thanks for requesting. this has been on our radar.
@Steejay I think what Rob meant was adding a row at the bottom of the table to sum numbers in each column. something like this in tableau.

the challenge for Design here is one -> when there's pagination(large amount of rows), how do we define which is the "last row" . does user need to flip to the last page to view total? or can we truncate from middle when user switch to the Sum mode.
two, where to add this switch?
@Steejay @mihir174
----------------------------------------------------------------
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.
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] junlincc edited a comment on issue #12907: [table] Total Row for Table Charts
Posted by GitBox <gi...@apache.org>.
junlincc edited a comment on issue #12907:
URL: https://github.com/apache/superset/issues/12907#issuecomment-773637539
----------------------------------------------------------------
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.
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] korpa commented on issue #12907: [table] Total Row for Table Charts
Posted by GitBox <gi...@apache.org>.
korpa commented on issue #12907:
URL: https://github.com/apache/superset/issues/12907#issuecomment-775918697
I would have 2 wishes if you start to work on this:
* Make total lines position configurable: _top_ or _bottom_
* Make total columns position configurable: _beginning_ or _end_
This could be very handy if you have many lines or many rows
----------------------------------------------------------------
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.
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] junlincc commented on issue #12907: [table] Total Row for Table Charts
Posted by GitBox <gi...@apache.org>.
junlincc commented on issue #12907:
URL: https://github.com/apache/superset/issues/12907#issuecomment-773637539
<img width="1402" alt="Screen Shot 2021-02-04 at 2 06 18 PM" src="https://user-images.githubusercontent.com/67837651/106961384-5939a180-66f2-11eb-9c0e-d167aaaf9511.png">
@rwspielman Thanks for requesting. this has been on our radar.
@Steejay I think what Rob meant was adding a row at the bottom of the table to sum numbers in each column. something like this in tableau.

the challenge for Design here is one -> when there's pagination(large amount of rows), how do we define which is the "last row" . does user need to flip to the last page to view total? or can we truncate from middle when user switch to the Sum mode.
two, where to add this switch?
@Steejay @mihir174
----------------------------------------------------------------
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.
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] rwspielman commented on issue #12907: [table] Total Row for Table Charts
Posted by GitBox <gi...@apache.org>.
rwspielman commented on issue #12907:
URL: https://github.com/apache/superset/issues/12907#issuecomment-773850365
Junlin (@junlincc), confirming that your second screenshot is the end result I'm looking for. We are coming from excel reporting mostly so the parallel in excel looks like this:
<img width="266" alt="Screen Shot 2021-02-05 at 1 04 40 AM" src="https://user-images.githubusercontent.com/20442310/107000837-2c1adc80-674e-11eb-8fe8-70810811b6e9.png">
To opine on your second design consideration of where to add the switch, I think that for the case of `Query Mode: Aggregate` it should be placed in the `Group By` section of the control panel. From a user standpoint, it would be like unioning an additional row where we are grouping by `True` (i.e. `SELECT "Grand Total" as <groupby>, <metrics> FROM <table> GROUP BY True ...`)
Additionally, our use case is for table viz `Query Mode: Aggregate`. For this case, it should carry over the metrics defined in the query section of the control panel and not require the user to define an aggregating function.
----------------------------------------------------------------
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.
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] Steejay commented on issue #12907: [table] Total Row for Table Charts
Posted by GitBox <gi...@apache.org>.
Steejay commented on issue #12907:
URL: https://github.com/apache/superset/issues/12907#issuecomment-773627302
@junlincc what does 'All' show in this context? Doesn't seem like it is displaying the sum of numbers in the result being displayed.

cc @mihir174
----------------------------------------------------------------
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.
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] Steejay commented on issue #12907: [table] Total Row for Table Charts
Posted by GitBox <gi...@apache.org>.
Steejay commented on issue #12907:
URL: https://github.com/apache/superset/issues/12907#issuecomment-773627302
@junlincc what does 'All' show in this context? Doesn't seem like it is displaying the sum of numbers in the result being displayed.

cc @mihir174
----------------------------------------------------------------
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.
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] junlincc commented on issue #12907: [table] Total Row for Table Charts
Posted by GitBox <gi...@apache.org>.
junlincc commented on issue #12907:
URL: https://github.com/apache/superset/issues/12907#issuecomment-966665270
the enhancement @korpa mentioned is scheduled for H2 22, but we can provide design support to anyone who wants to work on the implementation sooner. :)
--
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