superset icon indicating copy to clipboard operation
superset copied to clipboard

How to make Table View/ Pivot Table order by time?

Open vnnw opened this issue 9 years ago • 10 comments

Make sure these boxes are checked before submitting your issue - thank you!

  • [x] I have checked the superset logs for python stacktraces and included it here as text if 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

Superset version

0.19.1

Expected results

Table View displays data table order by _timestamp instead of metrics[0] by default, or allow us to customize it.

Actual results

order by metrics[0] and no options to change it.

Steps to reproduce

Create a table view/ pivot table, and in GROUP BY section check Include Time. See an example as below (I have to click on __timestamp to make the chart order by time):

The default display: image

What I expect:

image

vnnw avatar Sep 23 '17 01:09 vnnw

good idea. i also want to order table by selected metrics column.

gangh avatar Sep 27 '17 18:09 gangh

@gangh Seems V 0.20 has already provided the options you want. But I can't still find a way to sort the table by __timestamp.

vnnw avatar Sep 28 '17 07:09 vnnw

+1 for the feature but I just found a little work around in the meantime, add a metric in your table like max(orderdate) for example and use it to order your table. It'll do the job.

Jemteddy avatar Oct 13 '17 12:10 Jemteddy

@Jemteddy Good idea. Why I haven't thought of that? But I do hope there will be a option instead of working around.

vnnw avatar Oct 14 '17 04:10 vnnw

1 Like Pivot table, can Table View also choose the Number Format? 2 Table View/ Pivot Table can choose columns to order by?

chengwei1231 avatar Oct 26 '17 03:10 chengwei1231

+1 for this, ordering table / pivot table by any metric OR dimension would be an absolute killer feature.

gregroberts avatar Jun 26 '18 15:06 gregroberts

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

stale[bot] avatar Apr 10 '19 09:04 stale[bot]

Up. Pivot table is not sorted even on the first metric. In particular - query has valid ORDER BY, but visualization doesn't obey. Superset version is ebb7fbc5f024379361f301a86b770e0cc1a932cd.

aleh-arol avatar Jul 24 '19 16:07 aleh-arol

Up. We need configurable sort order setting for tables. Pivot comes up sorted in random order while I would like to be able to have first column sorted by default. Having users click the first column every time is bad.

Teeeto avatar Mar 16 '21 07:03 Teeeto

+1 for ability order table charts by __time / __timestamp

Having users click the first column every time is bad.

100% agree on that.

kyle0r avatar Apr 02 '21 12:04 kyle0r