# How to use group by and summarize feature

**URL:** <https://community.glideapps.com/t/how-to-use-group-by-and-summarize-feature/63697>\
**Category:** Ask for Help\
**Created:** [July 9, 2023, 10:03pm UTC](https://community.glideapps.com/t/how-to-use-group-by-and-summarize-feature/63697 "2023-07-09T22:03:03Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![zephir](https://avatars.discourse-cdn.com/v4/letter/z/e95f7d/32.png) [@zephir](https://community.glideapps.com/u/zephir)\
**Post date:** [July 9, 2023, 10:03pm UTC](https://community.glideapps.com/t/how-to-use-group-by-and-summarize-feature/63697/1 "2023-07-09T22:03:03Z")

</div>

Hi ,  
My table contains 5 columns  
reference product / color / size / order date (day) / quantity

First I want to sum quantity based on  
reference product / color / order date (week)

Then I want to determinate in fonction of a dynamic period the ordered quantity of  
reference product / color

I imagine I should build a table which is composed by  
reference product / color / order date.

Actually I have an another table composed by  
reference product / color / description. When I use a relation between the 2 tables , I can sum but without managing the period.

Any Help is appreciated !

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [July 10, 2023, 1:55am UTC](https://community.glideapps.com/t/how-to-use-group-by-and-summarize-feature/63697/2 "2023-07-10T01:55:00Z")

</div>

Have a look at the examples in the Query documentation.

> **[Glide • Query Column](https://www.glideapps.com/docs/reference/computed-columns/query-column)**
>
> Create complex relations in your data with conditional filtering, sorting and limits.

---

<div class="post-metadata">

**Author:** ![zephir](https://avatars.discourse-cdn.com/v4/letter/z/e95f7d/32.png) [@zephir](https://community.glideapps.com/u/zephir)\
**Post date:** [July 10, 2023, 11:37am UTC](https://community.glideapps.com/t/how-to-use-group-by-and-summarize-feature/63697/3 "2023-07-10T11:37:42Z")

</div>

I have tested this.  
But the problem with , I collect a list of order date which I can’t use.  
The extracted format is compatible for calculation and I don’t have found a feature which can manage a list of items and in the same time translate date to number.  
screenshot 1 : list of extracted dates by query

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/0/e/0e29301f4a578386eee396fbe76b13754a052f5f.png)  
screenshot 2 : Math feature incompatible with the wanted column (Date)  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/b/6/b6acd2365aecf83cffd82e527a44f8bded9cba80.png)

---

<div class="post-metadata">

**Author:** ![Darren\_Murphy](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/darren_murphy/32/47326_2.png) [@Darren\_Murphy](https://community.glideapps.com/u/Darren_Murphy)\
**Post date:** [July 10, 2023, 11:43am UTC](https://community.glideapps.com/t/how-to-use-group-by-and-summarize-feature/63697/4 "2023-07-10T11:43:56Z")

</div>

You can’t use that column in a Math column because it’s an array.  
For example, in the second row you have an array of 3 dates. How would you expect that to work inside the Math column - what would you expect the result to be?

---

<div class="post-metadata">

**Author:** ![zephir](https://avatars.discourse-cdn.com/v4/letter/z/e95f7d/32.png) [@zephir](https://community.glideapps.com/u/zephir)\
**Post date:** [July 10, 2023, 1:43pm UTC](https://community.glideapps.com/t/how-to-use-group-by-and-summarize-feature/63697/5 "2023-07-10T13:43:23Z")

</div>

The wanted format is year/weeknumber (ex : 202345)  
Now I can build query between my tables, but the result is not what I wish.  
I draw the diagram to explain the difference beetwen what I have obtain and what I wish  
 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/5/95769c5b9a51249b23573a91e3b8dda634ca0d62.png)

I imagine that  
First I must create a new table with the keys :

- weeknum
- reference
- color

Then with query feature and Order table , I can easily obtain the wanted report.  
My question is it possible to obtain the report without I create this new table just using the existing tables (Product / Order / weeknum) ?
