• Resolved Steff

    (@enlux)


    I need a formula that will calculate based on a amount range.

    Chart list:
    if from 7,500 to 15,000 then *5
    or
    if 15,001 to 50,000 then *7
    or
    if 50,001 to 125,000 then *9

    So, if fieldname1 is 8,000 then fieldname2 = 40,000

    if fieldname1 is 15,050 then fieldname2 = 105,350

    • This topic was modified 4 years, 4 months ago by Steff.
Viewing 1 replies (of 1 total)
  • Plugin Author codepeople

    (@codepeople)

    Hello @enlux

    In your example, the fieldname2 field would be a calculated field with the equation:

    
    (function(){
    var v = 1, f = fieldname1;
    if(AND(7500<=f, f<=15000)) v = 5;
    if(AND(15000<f, f<=50000)) v = 7;
    if(AND(50000<f, f<=125000)) v = 9;
    
    return f*v;
    })()
    

    Best regards.

    • This reply was modified 4 years, 4 months ago by codepeople.
Viewing 1 replies (of 1 total)
  • The topic ‘Pick value amount range to calculate (’ is closed to new replies.