2 Replies Latest reply on Sep 30, 2016 2:00 AM by Yuriy Fal

    Split column N times

    Mauricio Cacho Gutierrez

      Hi. I had an issue trying to filter values in multiple columns (Filter values in multiple columns ), the solution was to concatenate the columns, and filter using an String paramter, but my boss didn't quite loved the idea of the user having to write the exact text.

      After researching I ended up using "dynamic parameters" with the API (very useful reference: https://www.interworks.com/blog/daustin/2015/12/17/dynamic-parameters-tableau ). Now it's working, I have a filter with every tag and with the Javascript then I pass the selected value to a String Parameter that it's used as filter... Now the thing is that i'm ussing Single Value List and the want me to use Multiple Value... I could concatenate the values with Javascript and put in the String Parameter something like ".kids..Chocolate..250 gr.", but I'm using this function to filter:


      IF CONTAINS([Multitag],"."+UPPER(SPLIT([Search],"|",1))+".")

          THEN "show"

      ELSEIF LEN(SPLIT([Search],"|",2))>0 AND CONTAINS([Multitag],"."+UPPER(SPLIT([Search],"|",2))+".")

          THEN "show"

      ELSEIF LEN(SPLIT([Search],"|",3))>0 AND CONTAINS([Multitag],"."+UPPER(SPLIT([Search],"|",3))+".")

          THEN "show"

          ELSE "filter"



      But it's static to three values. Is there a way to split dynamically without knowing how many values are in the String Parameter?