Jump to content
Sign in to follow this  
Al Dugan

Need help with Complicated Formula

Recommended Posts

I guess this isn't a script but a formula question. I'm fairly new to Filemaker though so I am not sure.

I need to write a formula for a shipping rate calculation based on weight. The starting rate for anythin 1 lb or under is $5.95. I need to add $.50 per additional lb over that. The following is what I have so far:

If (ShipMethod = Ground and TotalWeight <= 1,5.95,If (ShipMethod = Ground and TotalWeight > 1,5.95 + .5))

I am stuck on the adding .50 per additional lb. Any help would be much appreciated.

Thank you.

Share this post


Link to post
Share on other sites

Thanks Lee.

The calculation only seems to work once though (it adds the initial .50 for being over 1lb but it doesn't add another .50 for over 2 lbs)

less than or equal to 1 lb = $.5.95

less than or equal to 2 lb = $.6.45

less than or equal to 3 lb = $.6.95 (doesn't work)

Thanks again.

Share this post


Link to post
Share on other sites

Case(ShipMethod = Ground,

5.95 + ((Round(TotalWeight + .49, 0) - 1) * .5))

We add .49 to the weight so that it will round up.

Share this post


Link to post
Share on other sites

Hi Al,

Tom's is a much smooter calculation than my approach. Use his.

You are correct about it not increasing blush.gif

The calculation for "AddCostCalc" needs to be changed to:

Case(Lbs <= 1.0, 0, Lbs> 1, Lbs * .50)

Sorry,

Lee

blush.gif

Share this post


Link to post
Share on other sites

I notice a couple of things about these two approaches.

1). Tom's calculations adds .50 for for each 1 pound increment greater than 1 pound.

2). My calculation (as previously modified) added back in the .50

Share this post


Link to post
Share on other sites

Hi Lee,

There is also an issue as to how the Round would be.

1,55 ---->2

1,45---- >1

Not used with lbs, but I am with Tons in my business, and it is likely that I'd charge a 1.999 Tons to 2.00 Tons instead of 1 Ton.

In fact, it is also likely that my transporter would rather round up a 1.450 Tons to 1.500 Tons.

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Sign in to follow this  

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.