October 26, 200421 yr 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.
October 26, 200421 yr 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
October 26, 200421 yr XX = Case( Number_Units; Min( Number_Units; 6 ) ) YY = Number_Units - XX Leave 'Do not evaluate if all referenced fields are empty' checked.
October 26, 200421 yr Author 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 < =
October 28, 200421 yr You don't necessarily need two calcs. Total = IF(Number_Units > 6; (6 * XX) + ((Number_Units - 6) * YY); Number_Units * XX)
Create an account or sign in to comment