UQL Query for custom sorting

I have column which as days in it “monday, tuesday…”. But by default, bar chart mixes the days. Used order by function to query, but it doesn’t work. so what query should I use here to sort correctly?. I don’t mind even if manual sorting is available.

Please provide a sample json data

|Day|Value|
|Monday|1|
|Tuesday|4|
|Wednesday|5|
|Thursday|6|
|Friday|6|
|Saturday|6|
|Sunday|5|
|Monday|5|
|Tuesday|7|

I am using csv file as input. I used uql query as “pivot sum(“Value”), “Day””.
Post this the bar chat doesn’t appear with sorted like starting from Sunday or monday, intead it starts from the random day and ends with random day.

Please help me sorting this. Thank you

Which is first day of week in you neck of the woods

May be adding sort criteria to Day column of source data and then using Grafana’s Sort by transformation would help to move further:

So is your csv really pipe delimited or comma delimited file?

Hi,

Sorting first in the input file helps.
But isn’t there a way to sort the days in grafana directly without using numbers before each day?

Thanks for the suggestion to sort it in input file first.
Appreciate your time.