3 Replies Latest reply on May 15, 2017 6:59 AM by Alexander Elfering

    How to use CONTAIN() to pull specific keywords?

    Alexander Elfering

      Hello,

       

      I have a question regarding this data set that I am working with. I need to calculate the total amount from France (fr), Germany (de), and Argentina (ar). Is it possible to create a calculated field that pulls cities with the abbreviations "de", "fr", and "ar" that are enclosed in parenthesis? I tried creating a calculated field such as: CONTAINS("ar", "de", "fr") but Tableau does not allow me to put more than three strings into the CONTAINS() statement. Ultimately, I want to calculate the amount from all of the cities in Germany, France, and Argentina, and divide it by the sum of all of the cities in the data set to get a percentage. What do you guys think?

       

      Regards,

      Alex