How do I change or manual sort X axis in Chart?

Highlighted
wtuntana
Level 2
How do I change or manual sort X axis in Chart?
Hello, I have another issue on dashboard.

The chart it cannot sort or order manually.

For example my X axis is '4 weeks ago' '3 weeks ago' '2 weeks ago' 'last week'

in dataset the row is order like this, but in chart it sort by name.

The chart shows '2 weeks ago' '3 weeks ago' '4 weeks ago' 'last week'

In sort function, there is only sort by data asc and desc.

How can I change the order in Chart back to '4 weeks ago' '3 weeks ago' '2 weeks ago' 'last week' ?



Moreover, in data lab is there any function to change row or column order? I cannot find them in step list.



Thank you.
0 Kudos
1 Reply
cperdigou Dataiker
Dataiker
Re: How do I change or manual sort X axis in Chart?
The ordering of labels is only offered by alphabetical order.

It seems to me that you want to restore the chronological order, so my question here would be why do you manipulate strings, and not dates? Dates would be handled correctly and you wouldn't see this issue.



Changing the order of rows or columns is not possible in the data lab. However you seem to be manipulating small tables, so if you want complete control you could use a "Push to editable" recipe and change the final table.
0 Kudos
Labels (2)