title: Extract word between two words in Tableau
body: <p>My data in a single column looks like this</p>
  
  <pre><code>Environment: PROD_A
  JobName: MY JOB NAME 1
  MemName: Some_Script_names
  </code></pre>
  
  <p>My aim is to create a calculated field where it fetches JobName.
  In above sample. The output should be <strong>MY_JOB_NAME_1</strong></p>
  
  <p>Here's my code in Tableau -</p>
  
  <pre><code>MID([Description],FIND([Description],"JobName: ")+9,
  FIND([Description],"MemName: ")-FIND([Description],"JobName: ")-9)
  </code></pre>
  
  <p>The above logic is same as excel function below. It basically finds first word and last word and then picks the one in between.</p>
  
  <pre><code>=MID(A1,SEARCH("JobName: ",A1)+9,SEARCH("MemName",A1)-SEARCH("JobName: ",A1)-9)
  </code></pre>
  
  <p>Issue -
  Tableau is showing blank data. Not sure where my logic is wrong. Any help is appreciated.</p>