# Group data by Year

**URL:** <https://community.glideapps.com/t/group-data-by-year/74290>\
**Category:** Ask for Help\
**Created:** [June 21, 2024, 6:38am UTC](https://community.glideapps.com/t/group-data-by-year/74290 "2024-06-21T06:38:24Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![ishita\_shah](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ishita_shah/32/76809_2.png) [@ishita\_shah](https://community.glideapps.com/u/ishita_shah)\
**Post date:** [June 21, 2024, 6:38am UTC](https://community.glideapps.com/t/group-data-by-year/74290/1 "2024-06-21T06:38:24Z")

</div>

I have data with the following columns:

1. Date
2. Income  
3.Expense  
How do I calculate the savings by year? I have already Extracted year from the date.

---

<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:** [June 21, 2024, 7:07am UTC](https://community.glideapps.com/t/group-data-by-year/74290/2 "2024-06-21T07:07:02Z")

</div>

- create a multiple relation column that matches the year with itself
- use two rollup-\>sum columns to get totals for each of income and expenses via the relation
- use a math column to subtract total expenses from total income

---

<div class="post-metadata">

**Author:** ![ishita\_shah](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ishita_shah/32/76809_2.png) [@ishita\_shah](https://community.glideapps.com/u/ishita_shah)\
**Post date:** [June 21, 2024, 7:41am UTC](https://community.glideapps.com/t/group-data-by-year/74290/3 "2024-06-21T07:41:00Z")

</div>

This is the first app I am building and have no knowledge about any of this. Can you elaborate on the relation columns?  
When i try to create one that matches year with itself it shows the data from the categories column.

 ![Screenshot 2024-06-21 125529](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/a/6/a6bd5edb7f7162b358630ddc504da29b85cc54bc.png)

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/9/a/9af4d4fc8b05740f193ff6258e9797b9666a5bc9.png)

These are the columns that I have

---

<div class="post-metadata">

**Author:** ![Jeff\_Hager](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/jeff_hager/32/43_2.png) [@Jeff\_Hager](https://community.glideapps.com/u/Jeff_Hager)\
**Post date:** [June 21, 2024, 12:57pm UTC](https://community.glideapps.com/t/group-data-by-year/74290/4 "2024-06-21T12:57:20Z")

</div>

What the relation actually shows as a result is irrelevant. It’s creating a connection to ROWS, not a specific column. If you see anything in a relation column, that means it returned all Rows that have matching values in the columns you used to create the relation.

After creating the relation, did you follow the rest of @Darren_Murphy’s steps?

---

<div class="post-metadata">

**Author:** ![ishita\_shah](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ishita_shah/32/76809_2.png) [@ishita\_shah](https://community.glideapps.com/u/ishita_shah)\
**Post date:** [June 22, 2024, 5:15am UTC](https://community.glideapps.com/t/group-data-by-year/74290/5 "2024-06-22T05:15:19Z")

</div>

Yes! I got it. Thank you so much.

---

<div class="post-metadata">

**Author:** ![ishita\_shah](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ishita_shah/32/76809_2.png) [@ishita\_shah](https://community.glideapps.com/u/ishita_shah)\
**Post date:** [June 22, 2024, 5:15am UTC](https://community.glideapps.com/t/group-data-by-year/74290/6 "2024-06-22T05:15:58Z")

</div>

It worked! Thank you so much

---

<div class="post-metadata">

**Author:** ![system](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/system/32/53398_2.png) [@system](https://community.glideapps.com/u/system)\
**Post date:** [June 29, 2024, 5:16am UTC](https://community.glideapps.com/t/group-data-by-year/74290/7 "2024-06-29T05:16:44Z")

</div>

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