1 Reply Latest reply on Feb 28, 2016 7:46 PM by Bill Lyons

    How to save the multiple split column results under one column(Just like union operation on different columns of same data type in SQL)?

    Maggie R

      Hi there!

       

      I have two dimensional columns Tag and Value. Tag is delimited by pipe symbol. I tried using custom split function to split the tag field but it creates multiple columns; instead I would like to see all the distinct values in a new column( New tag). Please see the screenshot below for additional details.

       

      Is this doable in tableau directly? I am unable to use db to perform this data manipulation at this time. Please advise. Thanks!

       

      Capture.PNG

        • 1. Re: How to save the multiple split column results under one column(Just like union operation on different columns of same data type in SQL)?
          Bill Lyons

          I do not know of any way to do this in Tableau in a single step. I was able to use the split function in the data source editor, then use the resulting data set in a second pass in the data source editor to pivot it into a shape like you desire. There are several limitations. First, you must know the maximum number of splits of the Tag field. If this is not known, I don't know a solution. Second, it requires 2 steps, which is not conducive to automating any views based on raw data.

           

          I'm sorry if this isn't optimal for you. It is the best I could do. Depending on your data source, you might be able to write custom SQL of some sort. If you can provide more information about your source, and whether you can build views or stored procedures in that source, we might be able to help more.