Baldrick Posted October 26, 2004 Posted October 26, 2004 I have a pricing model where 1 - 6 units cost $ XX, and then further units then cost $ YY. How can I split the value of the field OrderQty into two fields, BillUnits@XX and BillUnits@YY ? Obviously I need two calculations,one to return a value of 1 - 6, and the other to show the remaining quantity ordered (if any).... Help! Thanks in advance, Ben.
Lynn Johnson Posted October 26, 2004 Posted October 26, 2004 BillUnits@XX = If(Number_Units <= 6, Number_Units, 6) BillUnits@YY = If(Number_Units - BillUnits@XX > 0, Number_Units - BillUnits@XX, 0) If Number_Units is negative (which is meaningless from a business perspective, but perfectly valid mathematically), BillUnits@XX will be negative. Lynn
-Queue- Posted October 26, 2004 Posted October 26, 2004 XX = Case( Number_Units; Min( Number_Units; 6 ) ) YY = Number_Units - XX Leave 'Do not evaluate if all referenced fields are empty' checked.
Baldrick Posted October 26, 2004 Author Posted October 26, 2004 Thanks Lynn, not only have you solved my problem but you've also gotten rid of my calculations mental block (for now). I never noticed IF(This Condition, This Result, Otherwise Other Result)... Thanks again, Ben. PS. Anyone else trying to use the first calculation use not < =
hayesk Posted October 28, 2004 Posted October 28, 2004 You don't necessarily need two calcs. Total = IF(Number_Units > 6; (6 * XX) + ((Number_Units - 6) * YY); Number_Units * XX)
Recommended Posts
This topic is 7594 days old. Please don't post here. Open a new topic instead.
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now