Sausagefingers
Registered User.
- Local time
- Today, 20:18
- Joined
- Dec 14, 2006
- Messages
- 51
Hi,
I have a problem I'm trying to solve using an expression in a query
So far I have a working expression giving me the result I want.
Simply it's:
subtotal: ([ChargeA])+([ChargeB])+([ChargeC]) etc. etc.
However, I also have to apply an effective 'Cap' which I'm calling a 'Full Load Charge'.
Whenever a subtotal exceeds the full load charge I need to cap it so that our customer doesn't get over-charged. This full load charge is agreed with our customers.
Let's say for example that the subtotal for hauling goods from a supplier is £600 for a total of 20 pallets but the Full Load Charge has been agreed at £400.
How can I build an expression that will use the subtotal calculated until it reaches the full load charge limit and then use the agreed full load charge?
The expression might read something like... 'fullLoadChgCap: If 'subTotal' is less than or equal to 'fullLoadCharge' use 'subTotal' else use 'fullLoadCharge'
I don't know how to write this as an expression
.
Thanks in advance
I have a problem I'm trying to solve using an expression in a query
So far I have a working expression giving me the result I want.
Simply it's:
subtotal: ([ChargeA])+([ChargeB])+([ChargeC]) etc. etc.
However, I also have to apply an effective 'Cap' which I'm calling a 'Full Load Charge'.
Whenever a subtotal exceeds the full load charge I need to cap it so that our customer doesn't get over-charged. This full load charge is agreed with our customers.
Let's say for example that the subtotal for hauling goods from a supplier is £600 for a total of 20 pallets but the Full Load Charge has been agreed at £400.
How can I build an expression that will use the subtotal calculated until it reaches the full load charge limit and then use the agreed full load charge?
The expression might read something like... 'fullLoadChgCap: If 'subTotal' is less than or equal to 'fullLoadCharge' use 'subTotal' else use 'fullLoadCharge'
I don't know how to write this as an expression
Thanks in advance