redash icon indicating copy to clipboard operation
redash copied to clipboard

Time series in pivot tables appear to be ordered by first letter of month - rather than by date

Open nickw-hailo opened this issue 10 years ago • 10 comments

When dropping a "week" time series to get weekly metrics into the re:dash pivot table, re:dash appears to order based on first letter of the month instead of date/time eg. April, February, January, March, May). The query orders by time correctly, however.

nickw-hailo avatar May 14 '14 11:05 nickw-hailo

https://github.com/nicolaskruchten/pivottable/issues/169

arikfr avatar May 18 '14 12:05 arikfr

So, should re:dash be just using ISO format in the UI? (or pivot tables, at least). It's definitely a client-side formatting issue, since the JSON results data has timestamps in ISO format.

The comment on the above pivottable ticket implies it might be a wider issue...

I do think re:dash's time/date formatting could be more standardised. Another user has separately pointed out that when downloading date/time from re:dash via CSV, neither MS Excel nor GSheets can determine the fields with date/time are in fact date/time. This means a further reformat before they can be recognised and manipulated in a spreadsheet. Would be great to use a format that will get around both these issues.

rcoup avatar Mar 29 '16 18:03 rcoup

I don't we think should show ISO format in the UI, but rather just send it this way (or whatever format it needs) to the pivottable library.

arikfr avatar Mar 30 '16 12:03 arikfr

Having the same issue, but with weekdays instead of months. I agree with arikfr on this, send it in ISO to the pivottable library, and maybe add a field to the UI to customize the formatting. (with some sensible default)

matogertel avatar Aug 18 '16 21:08 matogertel

is it possible to apply REDAH_DATE_FORMAT config for the pivot UI? I don't understand technical details for it, but it would be great to fix the issue.

kimiyuki avatar Jan 28 '17 18:01 kimiyuki

Just trying out pivot tables and seeing the same issue - Friday, Monday, Saturday, Sunday ....

screen shot 2017-02-02 at 2 30 38 pm

olilogic77 avatar Feb 02 '17 04:02 olilogic77

I ran into this and tried using DATE_FORMAT() to change the format of the date - but redash parsed the date and converted it into that format and sorted everything wrong anyway. I had to modify the date format to have a leading space to prevent it from being parsed and reformatted to the undesirable format starting with a week day.

dobesv avatar Mar 05 '18 21:03 dobesv

Same here. even tried YYYYMM format and always unsorted. It would be nice to be possible, for datetime pivot dates, to allow group an drill down by week, month, quarter and years.

dudanogueira avatar Dec 22 '18 13:12 dudanogueira

Obs: instalaled from the docker here: https://github.com/getredash/redash/blob/master/setup/docker-compose.yml

dudanogueira avatar Dec 22 '18 13:12 dudanogueira

Same here.it would be better if it solved

amirashakernady avatar May 26 '22 09:05 amirashakernady