LevisNgigi opened a new pull request, #33407: URL: https://github.com/apache/superset/pull/33407
### SUMMARY This PR improves the Big Number with Trendline chart by making the "Aggregation Method" optional. Previously, aggregation was always applied, even for non-additive metrics such as COUNT(DISTINCT ...) or ratio expressions, resulting in misleading or incorrect Big Numbers. Now, when no aggregation method is selected, the Big Number query omits time-based grouping and computes the raw metric over the entire date range similar to the Big Number without trendline. This allows correct visualization of non-additive metrics while retaining support for additive ones via the optional dropdown. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF ### TESTING INSTRUCTIONS 1. Go to Explore and select the "Big Number with Trendline" chart. 2. Choose a non-additive metric (e.g. `COUNT(*) / COUNT(DISTINCT gender)`). 3. Set a time grain (e.g. monthly). 4. **Clear the "Aggregation Method" dropdown**. 5. Click "Run". 6. Verify that the Big Number displays a single raw value across the entire date range, and the trendline shows the correct per-period values. Also verify: - Additive metrics (e.g. SUM) work as before. - Clearing the aggregation method disables post-processing and grouping. ### 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: - [ ] 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
