Thanks Jeff. Currently, I use the Customer.CreditLimit field as it is and then have a calculated field for the ParentCredit which is -
‘’‘case
when RlsHead.TopCustNum = Customer.CustNum then 0
else ParentCredit.Customer1_CreditLimit
end’‘’
If I then try to sum the 2 fields for a TotalCredit- ‘’‘sum(ParentCredit+Customer.CreditLimit)’‘’, it won’t work as it says Column 'Erp.Customer.CustID is invalid in the select list because it is not contained in either an aggregate function of the GROUP BY clause. I know I don’t want to group on this as they are different Cust IDs.
If I try to do the case function, I am getting a load of syntax errors, though I am probably doing something wrong here.
‘’‘case
if ParentCredit <> 0 then ((Calc_Total / Customer1.CreditLimit) * 100)
else 0
end’‘’