7 Replies Latest reply on Sep 7, 2012 9:14 AM by Shawn Wallwork

    Use Calculated Fields as functions

    Sergey Boldt

      Hi,

       

      is it possible to use Calculated Fields as functions?

       

      For example, I need to implement this function

      "

      If [x]<0 then

        param=NULL

      else

          param=[x]

      end

      if [y]>0 then

        param=param+[y]

      end

      return param

      "

       

      In Tableau I have to create intermediate calculated field

      temp1=

      If [x]<0 then

        param=NULL

      else

          param=[x]

      end

       

      Value=

      if [y]>0 then

        [temp1]+[y]

      else

        [temp1]

      end