KNOWLEDGE BASE

How To Split Delimiter Separated Values Into Value Based Buckets


Published: 13 Sep 2020
Last Modified Date: 14 Sep 2020

Question

How to split delimiter separated values into value based buckets.
Example: Splitting the below column rows into columns having their respective values   
2,3
4,5,2,3
3
2
into 
23  
2345
 3  
2   
 

Environment

  • Tableau Desktop

Answer

Create different calculated fields like below Where A is the Column name having comma separated values in rows:

Calculated field name: 2

if CONTAINS([A],"2")=TRUE then "2" ELSE ""
END

Calculated field name: 3

if CONTAINS([A],"3")=TRUE then "3" ELSE ""
END

Calculated field name: 4

if CONTAINS([A],"4")=TRUE then "4" ELSE ""
END

Calculated field name: 5

if CONTAINS([A],"5")=TRUE then "5" ELSE ""
END

User-added image

 

Additional Information

Using Custom Split will split the content only based on Order of the values in which they appear 
Did this article resolve the issue?