• Resolved saulestrive

    (@saulestrive)


    Hello,

    I have been having problems with the else if function. It only takes three of the values provided with it.

    This is the formula I am using (when D is the amount of customers) to determine the product price

    IF( D <=10000 AND D >0 ) {599}
    ELSE IF( D >10000 AND D <=25000) { 1199 }

    ELSE IF ( D >25000 AND D <=10000) { 1799 }

    ELSE IF ( D > 10000 AND D <=20000) { 2399 }

    ELSE IF ( D > 20000 AND D <=50000)
    {2999}

    However, the only values that get displayed are 599, 1199 and 2999. (even if the amount of customers correlate to the other two prices)

    What is going wrong?

    Sincerely,

    Saule Daniulaityte

Viewing 1 replies (of 1 total)
  • Lisa StylemixThemes

    (@lisastylemixthemes)

    Hello @saulestrive

    The problem lies in the third condition: ELSE IF ( D >25000 AND D <=10000). This condition is always false because no number can be greater than 25,000 and less than or equal to 10,000 simultaneously.

    Here’s how to fix the formula:

    1. Remove the incorrect condition: Delete the third condition entirely:
    ELSE IF ( D >25000 AND D <=10000) { 1799 }
    
    1. Re-order the conditions (optional): While not strictly necessary for functionality in this case, it can improve readability to order the conditions from least to greatest number of customers:
    ELSE IF( D > 20000 AND D <=50000) {2999}
    ELSE IF( D > 10000 AND D <=25000) { 1199 }
    

    With these changes, the formula should correctly evaluate the number of customers (D) and assign the corresponding product price.

    Have a nice day!

    Lisa

Viewing 1 replies (of 1 total)

The topic ‘Product Price’ is closed to new replies.