title: MDX equivalent to LIKE
body: <p>In <code>SQL</code> I like to search a column for matches of a particular string using something like this:</p>
  
  <pre><code>SELECT t.attributeNAME
  FROM myTable t
  WHERE t.attributeNAME LIKE '%searchString%'
  </code></pre>
  
  <p>I might like to use that in a temp table and then use the result in subsequent sections of a longer script like so:</p>
  
  <pre><code>--find the keys
  SELECT t.attributeKEY
  INTO #Temp
  FROM myTable t
  WHERE t.attributeNAMELIKE '%searchString%'
  
  --use the keys
  SELECT SUM(f.measure)
  FROM myFacts f
     INNER JOIN #Temp t ON
      f.attributeKEY = t.attributeKEY
  
  --use the keys again
  SELECT SUM(F.measure)
  FROM myOtherFacts F
     INNER JOIN #Temp t ON
      F.attributeKEY = t.attributeKEY
  </code></pre>
  
  <p>Is there an equivalent to this in <code>MDX</code>? If I have an idea what items from a hierarchy that I'm after can I somehow use a searchString to filter to a specific set of items?</p>
  
  <hr>
  
  <p><strong>EDIT</strong>  </p>
  
  <p>As pointed out by Marc Polizzi answer it seems like <code>instr</code> is very useful in this situation and I can do the following:</p>
  
  <pre><code>CREATE SET [xCube].[Set_Names] AS
      {FILTER(
      [xDimension].[xHierarchy].[xLevel].Members,
      (InStr(1, [xDimension].[xHierarchy].CurrentMember.NAME, "WIL") &lt;&gt; 0) 
          )
          }
  
  GO
  
  SELECT  
      NON EMPTY 
             [Set_Names]
      ON ROWS,
      NON EMPTY
             [Measures].[x] 
      ON COLUMNS
  FROM [xCube]  
  
  GO
  
  SELECT  
      NON EMPTY 
             [Set_Names]
      ON ROWS,
      NON EMPTY
             [Measures].[y] 
      ON COLUMNS
  FROM [xCube]  
  
  GO
  
  SELECT  
       NON EMPTY 
             [Set_Names]
       ON ROWS,
       NON EMPTY
             [Measures].[z] 
       ON COLUMNS
  FROM [xCube]  
  </code></pre>