superset icon indicating copy to clipboard operation
superset copied to clipboard

[filter box] sort values in the filter

Open bkyryliuk opened this issue 9 years ago • 8 comments

allow user to sort the values in the filter

bkyryliuk avatar Mar 07 '17 22:03 bkyryliuk

there is a workaround via specifying the metric to be MAX or MIN

bkyryliuk avatar Mar 07 '17 22:03 bkyryliuk

It would be nice to divorce the sort from the metric, or make it selectable. Some filters (e.g. customer name) really want to be in alphabetical order. Other filters want to be in reverse alpha order, such year/quarter strings with the most recent at the top.

agriffis avatar Apr 01 '17 21:04 agriffis

Agree with the workaround, but to clarify agriffis, due to the way the query is written by the system it creates a lot of wackiness. For example,


SELECT ad, "DC_Sort" FROM (SELECT ad AS ad, min(ad) AS "DC_Sort" FROM "GGEBHART"."VW_HARDWARE_PIPELINE_UNP_ANAL" WHERE event_date >= TO_TIMESTAMP('2017-07-06T17:44:05', 'YYYY-MM-DD"T"HH24:MI:SS.ff6') AND event_date <= TO_TIMESTAMP('2017-07-13T17:44:05', 'YYYY-MM-DD"T"HH24:MI:SS.ff6') GROUP BY ad ORDER BY min(ad) DESC) WHERE ROWNUM <= 50000

-Why does the order by default to DESC with no seeming ability to change? -Why is it limiting Rownum to under 50,000? I mean for performance, yes... but what if I need it to look in more rows? --Why is there an inherent time series when this has nothing to do with time?

I would actually argue that the real need is an ability to manually alter the system-generated SQL statement to make it do what you need.

caseye avatar Jul 13 '17 17:07 caseye

Notice: this issue has been closed because it has been inactive for 283 days. Feel free to comment and request for this issue to be reopened.

mistercrunch avatar Apr 23 '18 05:04 mistercrunch

+1 I think it would make sense to have options within the filter slice to default sort order to alphabetic

csc5k avatar Aug 01 '18 07:08 csc5k

From a dashboard consumer perspective that is in deed one of the major UX flaws of our dashboards. In some cases the current sort order is just not intuitive at all and an optional alphabetic sort order would improve things greatly!

mosche avatar Dec 24 '18 10:12 mosche

Would be great to reopen this @mistercrunch Also, related: https://github.com/apache/incubator-superset/issues/3272

mosche avatar Dec 24 '18 10:12 mosche

Finally got around to this here https://github.com/apache/incubator-superset/pull/6523

mistercrunch avatar Dec 25 '18 00:12 mistercrunch