Search

How to Create a Single Filter for Column Separated Values in a Column in Tableau



How do you create a single filter from comma separated values in tableau in this example I have a field with comma separated values so this field has four six eight this one has one two three four and have a filter on the side that is filtering that view let's take a look at how to do this in tableau. Foreign using comma separated values in Tableau is a bit tricky first we're going to need to Pivot them into their own columns so I'm going to double click onto my data source and I'm going to add a union this is my data source it's a com separated value. I'm going to add a union for however many possible values there are in each field there are possible four in in mind so I'm going to add four unions of the same table so a self-union of comma separated four times click ok and let's go over to my sheet. Now I can write a calculated field for the filter I have a new field called table name. So I'm going to use that in my field create a calculated field and call it filter Place that in if table name equals comma separated for this so this one then split the field into the first value if it's comma separated one then split the field into the second value and so on click apply okay and let's put filter in place of field and we don't need table name anymore so here's all of my possible values you can add the filter to the filter Shelf and choose which ones I'd like to see.

4 views0 comments