# Study case

**URL:** <https://community.glideapps.com/t/study-case/72752>\
**Category:** Ask for Help\
**Created:** [April 20, 2024, 9:35am UTC](https://community.glideapps.com/t/study-case/72752 "2024-04-20T09:35:14Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yoga\_Purnama](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/yoga_purnama/32/73016_2.png) [@Yoga\_Purnama](https://community.glideapps.com/u/Yoga_Purnama)\
**Post date:** [April 20, 2024, 9:35am UTC](https://community.glideapps.com/t/study-case/72752/1 "2024-04-20T09:35:14Z")

</div>

Hi,

Wish you all good day.

I have a problem here. Let’s say I want to make the credit limit for my customer transaction. I will make table for identifying the specific limit for my each customer in customer\_db.

It consist of :  
cust name, initial credit limit, sum transaction, limit remains

for example  
cust A  
limit transaction = 1.000.000  
withdrawal 1 = 300.000  
remain limit =700.000

withdrawal 2=200.000  
remain limit = 500.000

witdrawal 3 = 100.000  
remain limit = 400.000

withdrwal 4= 500.000  
invalid because over remain limit

i tried to use restriction in every withdrawal in order to each withdrawal is not over limit.  
but the number of remain limit can’t be solved.  
really need help for this case. Thanks for your attention.

---

<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:** [April 20, 2024, 10:18am UTC](https://community.glideapps.com/t/study-case/72752/2 "2024-04-20T10:18:00Z")

</div>

> [@Yoga\_Purnama](#):
>
> It consist of :  
> cust name, initial credit limit, sum transaction, limit remains

How are you currently calculating “sum transaction”?

Assuming that you have a Transactions table that contains columns for CustomerID and Transaction Amount, you should do it as follows:

- In your Customers table, create a multiple relation column that matches the CustomerID with the same value in the Transactions table
- Use a Rollup-\>Sum via that relation to get a sum of transactions for each Customer.

Maybe that will help. If it doesn’t, some screen shots that show your data tables would be useful.
