3 Replies Latest reply on Feb 14, 2020 12:38 PM by Deepak Rai

    Thresholds in IF statement

    Katerin Rodriguez

      Hi,

       

      I need help adding some thresholds to the calculation below:

       

      If  ([Facebook CPL]> [Google CPL])

      THEN

      [FB Greater]

      ELSEIF ([Facebook CPL]<[Google CPL])

      THEN

      [Google Greater]

      ELSE

      [Same]

      END

       

      Right now the statement is giving outputs simply if one CPL calculation is greater than the other. What I want to incorporate is a threshold so if either calculation is only slightly over, say by 3, then the last part of the statement is triggered and [same] is the output. If the initial x>y calculation is greater than 3, then 1 of the first two statements is triggered.

       

      Essentially I am looking for:

      If  ([Facebook CPL]> [Google CPL] by more than 3)

      THEN

      [FB Greater]

       

      Which functions/syntax can I use to accomplish this?

       

      Thank you,

      Katy