intgr opened a new issue #16543: URL: https://github.com/apache/superset/issues/16543
When creating a chart and adding multiple "custom SQL" metrics, the frontend seems to truncate them to generate the label. If this truncated label is not unique, then only one of the several metrics will be displayed. I frequently create multiple metrics like: ```sql SUM(vaccinations) FILTER (WHERE agegroup<=17) SUM(vaccinations) FILTER (WHERE agegroup BETWEEN 18 AND 39) SUM(vaccinations) FILTER (WHERE agegroup BETWEEN 40 AND 59) SUM(vaccinations) FILTER (WHERE agegroup>=60) ``` All of these will have the same generated label `SUM(vaccinations) FILTER (WHERE agegroup...` ### Workaround Manually distinct adding labels solves this issue. That's a good idea in any case, but a bit extra work when prototyping. ### Expected results If I add multiple metrics, I want to see multiple metrics in the resulting graph. ### Actual results Only one of many metrics is displayed. #### Screenshots  #### How to reproduce the bug 1. Create new chart. 2. Add multiple "custom SQL" metrics with identical first 40 characters. 3. Run ### Environment (please complete the following information): - superset version: 0.0.0dev; git hash 80c39daa85c9be9e66a2e3cf2c9e2a8e5a74a8d6 - python version: 3.9.6 - node.js version: 16.8.0 - any feature flags active: (no, using default config) ### Checklist Make sure to follow these steps before submitting your issue - thank you! - [x] I have checked the superset logs for python stacktraces and included it here as text if there are any. - [x] I have reproduced the issue with at least the latest released version of superset. - [x] I have checked the issue tracker for the same issue and I haven't found one similar. -- 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]
