LevisNgigi opened a new pull request, #33656: URL: https://github.com/apache/superset/pull/33656
<!--- feat(chart): add toggle for percentage metric calculation mode in Table chart --> ### SUMMARY This PR introduces a new control in the Table chart visualization that allows users to configure how percentage metrics are calculated. Previously, percentage metrics were always computed based on the limited set of rows returned by the main query, which could lead to misleading results. With this change, users can now choose between two modes: Row limit (default) – Percentage values are calculated using only the data returned by the query, respecting the row limit. All records – Percentage values are calculated using totals from the full dataset, ignoring the row limit. This mode triggers an auxiliary query to fetch the necessary totals, which are injected into post-processing for accurate contribution calculations. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF <!--- Skip this if not applicable --> ### TESTING INSTRUCTIONS 1) Open the Explore view for a Table chart. 2) Select a percentage metric and set a row limit (e.g., 10). 3) In the control panel, choose "Percentage metric calculation" → "All records". 4) Run the query and verify that percentage values reflect the entire dataset (not just the top 10 rows). 5) Switch back to "Row limit" and confirm that percent values update to reflect only the visible rows. ### ADDITIONAL INFORMATION <!--- Check any relevant boxes with "x" --> <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue --> - [ ] Has associated issue: - [ ] Required feature flags: - [ x ] Changes UI - [ ] Includes DB Migration (follow approval process in [SIP-59](https://github.com/apache/superset/issues/13351)) - [ ] Migration is atomic, supports rollback & is backwards-compatible - [ ] Confirm DB migration upgrade and downgrade tested - [ ] Runtime estimates and downtime expectations provided - [ ] Introduces new feature or API - [ ] Removes existing feature or API -- 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-unsubscr...@superset.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: notifications-unsubscr...@superset.apache.org For additional commands, e-mail: notifications-h...@superset.apache.org