orderr66 opened a new issue #10256:
URL: https://github.com/apache/incubator-superset/issues/10256


   Hello there :) Is there anything like compare selected(filtered) data with 
rest(other) of data. ? 
   
   For example:
   I want to compare count of users in Top 5 country with sum of user count in 
other countries ?
   US ->2ml
   UK ->1ml
   ..
   Other - 10ml
   
   **Describe alternatives you've considered**
   For now I'm creating calculated column: country_other
   For example:
   CASE
   WHEN country in (
   select x.country  from (
       select country, COUNT(country ) as num  from 'ex_table'  GROUP BY 
country ORDER BY num DESC LIMIT 5
   ) as x )
    THEN country
   ELSE 'other'
   END
   
   Also I'm facing with subquery limit issue while using this approach.
   
   Thankss!
   
   **Additional context**
   I'm using Druid as Datasource.
   


----------------------------------------------------------------
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:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to