# Roll-up based on the logged in user

**URL:** https://community.glideapps.com/t/roll-up-based-on-the-logged-in-user/58504
**Category:** Ask for Help
**Created:** [February 26, 2023, 7:43pm UTC](https://community.glideapps.com/t/roll-up-based-on-the-logged-in-user/58504 "2023-02-26T19:43:45Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![Ryan](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ryan/32/15941_2.png) [@Ryan](https://community.glideapps.com/u/Ryan)
#### Post date: [February 26, 2023, 7:43pm UTC](https://community.glideapps.com/t/roll-up-based-on-the-logged-in-user/58504/1 "2023-02-26T19:43:45Z")

</div>

I want to build a simple glide app expenses tracking app, where multiple users record their expenses.  
Is there a way to summarize these records based on different parameters and limited to the signed in user only?

---

<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: [February 26, 2023, 8:00pm UTC](https://community.glideapps.com/t/roll-up-based-on-the-logged-in-user/58504/2 "2023-02-26T20:00:17Z")

</div>

Applying Row Owners will automatically restrict data to only the rows that belong to the signed in user.

Depending on your other parameters, you can usually create a relation using template columns that contains multiple values, and then base your rollup off if that relation.

---

<div class="post-metadata">

### Author: ![Ryan](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ryan/32/15941_2.png) [@Ryan](https://community.glideapps.com/u/Ryan)
#### Post date: [February 26, 2023, 9:58pm UTC](https://community.glideapps.com/t/roll-up-based-on-the-logged-in-user/58504/3 "2023-02-26T21:58:57Z")

</div>

Thanks Jeff,  
Much appreciated but not sure I get it 😳

Would that be too much to ask if you can share a more detailed explanation/ example?

Thank you!

---

<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: [February 26, 2023, 10:02pm UTC](https://community.glideapps.com/t/roll-up-based-on-the-logged-in-user/58504/4 "2023-02-26T22:02:55Z")

</div>

Applying Row Owners is pretty self explanatory.

> **[Glide • Row Owners](https://www.glideapps.com/docs/reference/security-and-user-data/row-owners)**
>
> A secure way to restrict access to certain rows.

As for your other parameters, it would help if you explained what your data looks like and what you are looking to achieve. I can give you a generic answer, but it may or may not apply to your specific situation.

---

<div class="post-metadata">

### Author: ![Ryan](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/ryan/32/15941_2.png) [@Ryan](https://community.glideapps.com/u/Ryan)
#### Post date: [February 27, 2023, 7:51am UTC](https://community.glideapps.com/t/roll-up-based-on-the-logged-in-user/58504/5 "2023-02-27T07:51:34Z")

</div>

Thanks @Jeff_Hager  
Sounds like you’re a real pro 🙂

Saying my table structure looks like this

1. Row ID
2. Transaction Value (Numeric)
3. Category (Closed list)
4. Active (Boolean)
5. Row Owner (Email)

I want to summarize the transaction value based on the logged-in user, and to make it juicier - I want to filter out the non-active transactions.

Thanks ahead

---

<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: [February 27, 2023, 7:56am UTC](https://community.glideapps.com/t/roll-up-based-on-the-logged-in-user/58504/6 "2023-02-27T07:56:42Z")

</div>

- In your Transactions table, create an if-then-else column:  
– If Active is checked, then Value
- Now add a rollup column (in any table) that targets that if-then-else column.

The rollup can be a sum, count, max, min, average, etc.  
As long as your Row Owners are correctly applied, that is all that is required.

Note that when you look in the Data Editor it might appear that the rollup is considering all rows, but again as long as your row owners are correctly applied, it will work as expected in the published App.
