# Filtering by Quarter, Day of Month and Week of the Year (w/ TimeZone)

**URL:** https://discuss.elastic.co/t/filtering-by-quarter-day-of-month-and-week-of-the-year-w-timezone/83976
**Category:** Elasticsearch
**Created:** [April 28, 2017, 7:38am UTC](https://discuss.elastic.co/t/filtering-by-quarter-day-of-month-and-week-of-the-year-w-timezone/83976 "2017-04-28T07:38:31Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![Paulo\_Henrique\_PH](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paulo_henrique_ph/32/14831_2.png) [@Paulo\_Henrique\_PH](https://discuss.elastic.co/u/Paulo_Henrique_PH)
#### Post date: [April 28, 2017, 7:38am UTC](https://discuss.elastic.co/t/filtering-by-quarter-day-of-month-and-week-of-the-year-w-timezone/83976/1 "2017-04-28T07:38:31Z")

</div>

Hi all,

I've got this requirement in my lap for a while, and I couldn't find how to implement it anywhere.

I need to be able to yield an aggregation where it is possible to filter by a given quarter (from 1 to 4). For example:

**My\_Date\_Field = 1 or 3** (the first or third quarter of the year, regardless the year itself).

I'm currently doing that when the data is been ingested, by creating a column with the quarter that the given date belongs to.

The problem with that is, I can't support time zone unless I create one dimension for each region around the word.

The problem is the same for the other mentioned dimensions.

Any suggestion?

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [April 28, 2017, 7:43am UTC](https://discuss.elastic.co/t/filtering-by-quarter-day-of-month-and-week-of-the-year-w-timezone/83976/2 "2017-04-28T07:43:16Z")

</div>

There's no real easy way to do this, we did just add the range query and perhaps there's a way to adapt that to work here somehow?

It'd be great if you could raise an issue on github to see how we might be able to improve this sort of use case 🙂

---

<div class="post-metadata">

### Author: ![Paulo\_Henrique\_PH](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paulo_henrique_ph/32/14831_2.png) [@Paulo\_Henrique\_PH](https://discuss.elastic.co/u/Paulo_Henrique_PH)
#### Post date: [April 28, 2017, 7:45am UTC](https://discuss.elastic.co/t/filtering-by-quarter-day-of-month-and-week-of-the-year-w-timezone/83976/3 "2017-04-28T07:45:16Z")

</div>

Thanks @warkolm, I'll do it.

May you send the link of this new range query?

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [April 28, 2017, 7:51am UTC](https://discuss.elastic.co/t/filtering-by-quarter-day-of-month-and-week-of-the-year-w-timezone/83976/4 "2017-04-28T07:51:34Z")

</div>

Sorry, I meant range datatype - [https://www.elastic.co/guide/en/elasticsearch/reference/5.3/range.html](https://www.elastic.co/guide/en/elasticsearch/reference/5.3/range.html)

---

<div class="post-metadata">

### Author: ![Paulo\_Henrique\_PH](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/paulo_henrique_ph/32/14831_2.png) [@Paulo\_Henrique\_PH](https://discuss.elastic.co/u/Paulo_Henrique_PH)
#### Post date: [May 1, 2017, 12:19am UTC](https://discuss.elastic.co/t/filtering-by-quarter-day-of-month-and-week-of-the-year-w-timezone/83976/5 "2017-05-01T00:19:31Z")

</div>

Hi,

Unfortunately, it doesn't help.

So, the best channel to open this request is via opening a bug at git hub?

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [May 1, 2017, 12:44am UTC](https://discuss.elastic.co/t/filtering-by-quarter-day-of-month-and-week-of-the-year-w-timezone/83976/6 "2017-05-01T00:44:28Z")

</div>

It's not a bug, but you can raise a feature request, yep! 🙂

---

<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: [May 29, 2017, 12:51am UTC](https://discuss.elastic.co/t/filtering-by-quarter-day-of-month-and-week-of-the-year-w-timezone/83976/7 "2017-05-29T00:51:46Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
