# Help with a Computed column

**URL:** <https://community.glideapps.com/t/help-with-a-computed-column/78086>\
**Category:** Ask for Help\
**Tags:** computed-columns\
**Created:** [November 21, 2024, 4:28am UTC](https://community.glideapps.com/t/help-with-a-computed-column/78086 "2024-11-21T04:28:57Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ninan\_Joseph](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ninan_joseph/32/80950_2.png) [@Ninan\_Joseph](https://community.glideapps.com/u/Ninan_Joseph)\
**Post date:** [November 21, 2024, 4:28am UTC](https://community.glideapps.com/t/help-with-a-computed-column/78086/1 "2024-11-21T04:28:57Z")

</div>

I would like to have help on the following issue with computation in tables:

1. I have three column fields namely, Apt\_No, Name, and Water charges.
2. Since there are two people staying in the same apartment, I have used two rows with the same apartment number (Apt\_No) against which Names of the residents are entered.  
Eg:  
Apt\_No Name Water\*  
1 Jack 30  
1 Jane   
2 Joe 30  
2 Mary   
• I need a computed column here where 30 must appear only once if the Apt\_No is the same.  
Could someone help, please!

---

<div class="post-metadata">

**Author:** ![micheal](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/micheal/32/80181_2.png) [@micheal](https://community.glideapps.com/u/micheal)\
**Post date:** [November 21, 2024, 12:29pm UTC](https://community.glideapps.com/t/help-with-a-computed-column/78086/2 "2024-11-21T12:29:37Z")

</div>

are you using a relation for this ?  
I’m sure each user has a user profile (or not). For each user, assign an apartment number for them, and then you can easily make a relation that writes to both in the same apartment.

So instead of writing two rows for each user, it would be a single row

---

<div class="post-metadata">

**Author:** ![Ninan\_Joseph](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ninan_joseph/32/80950_2.png) [@Ninan\_Joseph](https://community.glideapps.com/u/Ninan_Joseph)\
**Post date:** [November 21, 2024, 1:58pm UTC](https://community.glideapps.com/t/help-with-a-computed-column/78086/3 "2024-11-21T13:58:59Z")

</div>

Thank you Michael for the quick response.  
I have created relations with Apt\_No. All that is fine. Here the User is the Apt-No itself. My issue is that IF the Apt\_No is the same there should only be one value in the last column titled Water

Ninan Joseph

---

<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:** [November 21, 2024, 2:02pm UTC](https://community.glideapps.com/t/help-with-a-computed-column/78086/4 "2024-11-21T14:02:49Z")

</div>

- Add a RowID column to your table
- Create a multiple relation column that matches the apartment number with itself
- Use a Single Value column to fetch the first RowID via the relation
- Finally, add an if-then-else column:  
– If RowID is Single Value RowID, then Water

The result of the above is that the if-then-else column should contain the value of the water column in only the first row occurrence of each apartment number.

---

<div class="post-metadata">

**Author:** ![Ninan\_Joseph](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ninan_joseph/32/80950_2.png) [@Ninan\_Joseph](https://community.glideapps.com/u/Ninan_Joseph)\
**Post date:** [November 22, 2024, 3:42am UTC](https://community.glideapps.com/t/help-with-a-computed-column/78086/5 "2024-11-22T03:42:19Z")

</div>

Wow Darren! That was superb! I got it! Thanks a Million!!

---

<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:** [November 29, 2024, 3:42am UTC](https://community.glideapps.com/t/help-with-a-computed-column/78086/6 "2024-11-29T03:42:40Z")

</div>

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