
Hi,
I want to split the following colums in Tableau prep before the third occurrence of "/".
This is an example:
Right now my colom value looks like this:
https://www.cisco.com/msgs/cco_expired_content.html
But I only want:
Does someone has a formula for this?
Kind regards
Hello Eveline,
Try the following
TRIM( SPLIT( [String], "/", 3 ) )
If this answers your question please mark it as correct so that others may find it in their search for a solution in the future. Best, Don
Edited: I just realized you also want the preceding the website. In that case. Simply click the ellipses for the URL and select Split then Automatic. Prep will split off all the values based on the '/' forward slash automatically.
Thereafter create the following calculation and call it simply URL:
[String - Split 1]+'://'+[String - Split 2]
You can remove all of the other splits thereafter without any issue. Attached is the .tfl file.