# Making a Change/Variation Column using previous row data

**URL:** <https://community.glideapps.com/t/making-a-change-variation-column-using-previous-row-data/65973>\
**Category:** Ask for Help\
**Created:** [September 10, 2023, 2:40pm UTC](https://community.glideapps.com/t/making-a-change-variation-column-using-previous-row-data/65973 "2023-09-10T14:40:16Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![E\_J\_E](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/e_j_e/32/29498_2.png) [@E\_J\_E](https://community.glideapps.com/u/E_J_E)\
**Post date:** [September 10, 2023, 2:40pm UTC](https://community.glideapps.com/t/making-a-change-variation-column-using-previous-row-data/65973/1 "2023-09-10T14:40:16Z")

</div>

Hi all.  
Change(variation): I am trying to make in glide tables the variation between Row1 and Row 2 and so forth. In GS it is simple but manual task, now that i am trying to use GlideTables its much more challenging.  
Maybe there is a video or topic done on this already that even though ive looked have not found? if not, what would be the simplest way to proceed to do this?  
I will add an example of my table in GS:

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

Thank you all!

---

<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:** [September 10, 2023, 2:44pm UTC](https://community.glideapps.com/t/making-a-change-variation-column-using-previous-row-data/65973/2 "2023-09-10T14:44:46Z")

</div>

The below should be helpful. It’s not _exactly_ the same, but you should be able to use a similar approach.

---

<div class="post-metadata">

**Author:** ![E\_J\_E](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/e_j_e/32/29498_2.png) [@E\_J\_E](https://community.glideapps.com/u/E_J_E)\
**Post date:** [September 10, 2023, 4:26pm UTC](https://community.glideapps.com/t/making-a-change-variation-column-using-previous-row-data/65973/3 "2023-09-10T16:26:59Z")

</div>

Thank Darren. Though i can manage to replicate your exact example, i cant get around to getting the value between difference between week 1 and w2.

 ![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/3X/2/a/2a0a6a9eedf394a9dce57acc66aba33ab128d3f0.jpeg)

---

<div class="post-metadata">

**Author:** ![ThinhDinh](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/thinhdinh/32/49_2.png) [@ThinhDinh](https://community.glideapps.com/u/ThinhDinh)\
**Post date:** [September 11, 2023, 12:47am UTC](https://community.glideapps.com/t/making-a-change-variation-column-using-previous-row-data/65973/4 "2023-09-11T00:47:01Z")

</div>

So circling back to your original post, do you mean you need to see the “change” column, and that change is calculated only based on the “Total 1+2” column?

At the end, do you want that “Total 1+2” column to be a computed column as well, opposed to what you have as a number column now?

You can have a math column to calculate the previous week, a relation/query to relate to the previous week from the current row, lookup the previous week’s total, and finally a math column to get the “change” value. Apply formatting as needed afterwards.

---

<div class="post-metadata">

**Author:** ![E\_J\_E](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/e_j_e/32/29498_2.png) [@E\_J\_E](https://community.glideapps.com/u/E_J_E)\
**Post date:** [September 11, 2023, 1:10am UTC](https://community.glideapps.com/t/making-a-change-variation-column-using-previous-row-data/65973/5 "2023-09-11T01:10:01Z")

</div>

> [@ThinhDinh](#):
>
> “change” column

1. is calculated only based on the “Total 1+2” column: yes
2. “Total 1+2” column to be a computed column as well: yes
3. math column to calculate the previous week, a relation/query to relate to the previous week from the current row, lookup the previous week’s total, and finally a math column to get the “change” value: seems as this could work. i will try to do this. thank you. (PS if u have any additional material on the relation/query part would be greatly appreciated).
