How do I sort x axis of a chart in dashboard?

Solved!
msr
Level 2
How do I sort x axis of a chart in dashboard?
  1. The x-axis is date and it is coming in jumbled order
  2. The x-axis is string but in different charts the same values are coming in different order

How can this be fixed?


Operating system used: Windows

Thanks,
Mahendra
0 Kudos
1 Solution
ZachM
Dataiker

Hi @msr,

You can change the sort order of the X-axis by clicking the ▾ arrow next to the column name in the chart editor. You can sort by natural (alphabetical) order, or sort based on the record count.

996A9237-2009-424F-8C44-75D58666ECF6_1_201_a.jpeg

 

Also, for your chart that's using a date, I could be wrong, but it looks like the type of the "Metric date" column might not actually be a date. Could you please verify that the type is correct in the dataset?

9322AED7-687C-4FD4-81C3-9C2295CA93DC_1_201_a.jpeg

If it's not a date, you might need to parse the date first. See this article for more information: Managing dates.

 

Thanks,

Zach

View solution in original post

0 Kudos
2 Replies
ZachM
Dataiker

Hi @msr,

You can change the sort order of the X-axis by clicking the ▾ arrow next to the column name in the chart editor. You can sort by natural (alphabetical) order, or sort based on the record count.

996A9237-2009-424F-8C44-75D58666ECF6_1_201_a.jpeg

 

Also, for your chart that's using a date, I could be wrong, but it looks like the type of the "Metric date" column might not actually be a date. Could you please verify that the type is correct in the dataset?

9322AED7-687C-4FD4-81C3-9C2295CA93DC_1_201_a.jpeg

If it's not a date, you might need to parse the date first. See this article for more information: Managing dates.

 

Thanks,

Zach

0 Kudos
msr
Level 2
Author

Thanks a lot @ZachM !

It helped. Yes it wasn't date, I have it now and it is now working as expected. 

Thanks,
Mahendra
0 Kudos