# How to sort day of week in kibana?

**URL:** <https://discuss.elastic.co/t/how-to-sort-day-of-week-in-kibana/49531>\
**Category:** Kibana\
**Created:** [May 9, 2016, 9:30am UTC](https://discuss.elastic.co/t/how-to-sort-day-of-week-in-kibana/49531 "2016-05-09T09:30:14Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![saba\_soltani](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@saba\_soltani](https://discuss.elastic.co/u/saba_soltani)\
**Post date:** [May 9, 2016, 9:30am UTC](https://discuss.elastic.co/t/how-to-sort-day-of-week-in-kibana/49531/1 "2016-05-09T09:30:14Z")

</div>

Hi

I have a string field in my data set "Week\_day" which contains Monday , Tuesday ,.... . I want to create a barchart to show average of sales in each day during a period. when I am using bar chart and average aggregation , in the phase of X.Axis definition I define term aggregation and select "Week\_day" and the order is based on "average of sales" . In this way, the week days will be sort based on highest average but I am looking for a way to have a sort of week days in X.Axis looks like ( Monday Tuesday Wednesday ...) and each bar shows the average of sales belongs that day.

P.S : I also have timestamp field in my dataset.

---

<div class="post-metadata">

**Author:** ![tylersmalley](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/tylersmalley/32/8833_2.png) [@tylersmalley](https://discuss.elastic.co/u/tylersmalley)\
**Post date:** [May 10, 2016, 12:09am UTC](https://discuss.elastic.co/t/how-to-sort-day-of-week-in-kibana/49531/2 "2016-05-10T00:09:10Z")

</div>

I believe what you are looking for can be accomplished with a filter aggregation.

 ![](https://us1.discourse-cdn.com/elastic/original/2X/a/ae5dafdf938086d7ff428e85a8d2298a5228ffa9.png)

Your filter aggregations would have seven filters consist of Week\_day:Monday through Week\_day:Sunday.

---

<div class="post-metadata">

**Author:** ![saba\_soltani](https://avatars.discourse-cdn.com/v4/letter/s/91b2a8/32.png) [@saba\_soltani](https://discuss.elastic.co/u/saba_soltani)\
**Post date:** [May 10, 2016, 7:37am UTC](https://discuss.elastic.co/t/how-to-sort-day-of-week-in-kibana/49531/3 "2016-05-10T07:37:34Z")

</div>

It works fine. Thank you so much . This is the exact thing that I was looking for

---

<div class="post-metadata">

**Author:** ![styfle](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/styfle/32/7291_2.png) [@styfle](https://discuss.elastic.co/u/styfle)\
**Post date:** [May 2, 2017, 12:54pm UTC](https://discuss.elastic.co/t/how-to-sort-day-of-week-in-kibana/49531/4 "2017-05-02T12:54:07Z")

</div>

@tsmalley Is this chart possible by using a single Date field that does not have separate "week\_day" properties on it?

How about doing a chart by Hour Of The Day?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:32pm UTC](https://discuss.elastic.co/t/how-to-sort-day-of-week-in-kibana/49531/5 "2017-07-06T13:32:04Z")

</div>


