marianysilva commented on issue #21425:
URL: https://github.com/apache/superset/issues/21425#issuecomment-2403128905
We applied a small workaround here by adding invisible characters to the
names of the days of the week to get the correct sorting. By using this field
on the x-axis, you can sort properly.
```
DECODE(
EXTRACT(DAYOFWEEK FROM OPERATIONAL_DATE_LTZ),
1, '\uFE01Sunday',
2, '\uFE02Monday',
3, '\uFE03Tuesday',
4, '\uFE04Wednesday',
5, '\uFE05Thursday',
6, '\uFE06Friday',
7, '\uFE07Saturday'
)
```
This also works for sorting metrics. You just need to add the invisible
character to the metric name in the YAML file.
```
- metric_name: work
verbose_name: "\uFE03Work"
```
```
- metric_name: schedule
verbose_name: "\uFE03schedule"
```
```
- metric_name: unfilled
verbose_name: "\uFE03Unfilled"
```



--
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]