2 Replies Latest reply on Jun 21, 2012 9:41 AM by Nick Sanchez

    Condition formulas

      Does Tableau use a general syntax for condition formulas? If so, what would that be?

       

      I am trying to filter out information based on a description field. In the description field there are file names that vary, but end in the same extension. I want to filter out the files based on the extension and I am having a hard time creating the formula within the Condition tab.

       

      DescriptionNumber of Records
      File 'c:\program files\xxx\xxx\xxx\xxx\xxx\007720015467060812013.dup' was modified or deleted.3
      File 'c:\program files\xxx\xxx\xxx\xxx\xxx\007720015536060912014.dup' was modified or deleted.3
      File 'c:\program files\xxx\xxx\xxx\xxx\xxx\007720015536060912014.gr' was modified or deleted.3

       

      Thx

        • 1. Re: Condition formulas
          Tracy Rodgers

          Hi Jeff,

           

          Although I am not completely sure of the desired outcome, I believe creating a calculated field similar to the following will allow the user to filter out different types of files:

           

          if contains([Description], ".dup") then "dup files"

          elseif contains([Description], ".gr") then "gr files"

          end

           

          Then, by placing this on the view, the user will be able to see all the same type of files together.

           

          I hope this helps!

           

          -Tracy

          • 2. Re: Condition formulas
            Nick Sanchez

            In this specific case, perhaps ENDSWITH() would be more accurate, if you could first truncate the part at the end which looks consistent.