Study case

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.

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.

1 Like