title: MDX: Query if row exists in dimension
body: <p>I have created a SSAS Tabular model cube which this connects too.
  The cube contains
  Measures: - CountA, SumB, CountC, SumD, CountE
  Dimensions: 
   - TblLabelDefinition(ID,Definition,Type)<br>
   - TblLabels(ID,Type,reference,date,sold,leftover,A,B,C,D,E)<br>
   - References(ID,reference,date)</p>
  
  <p>Below is a query I am working on: </p>
  
  <pre><code>SELECT 
  NON EMPTY 
      { 
       [Measures].[CountA], 
       [Measures].[SumB], 
       [Measures].[CountC], 
       [Measures].[SumD], 
       [Measures].[CountE] 
      } 
  ON COLUMNS, 
  NON EMPTY 
      { 
       (
        [TblLabelDefinition].[Definition].[Definition].ALLMEMBERS * 
        [TblLabels].[Type].[Type].ALLMEMBERS 
       ) 
      }
  DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS 
  FROM 
      ( 
          SELECT ( -{ [TblLabels].[sold].&amp;[1] } ) ON COLUMNS 
          FROM 
              ( SELECT ( { [TblLabels].[leftover].&amp;[0] } ) ON COLUMNS 
                  FROM [Model]
              )
      ) 
  WHERE 
          ( [TblLabels].[leftover].&amp;[0] ) 
          AND 
          (
           EXISTS([TblLabels].[reference], [References].[reference])
          )   
  CELL PROPERTIES VALUE, BACK_COLOR, FORE_COLOR, 
  FORMATTED_VALUE, FORMAT_STRING, FONT_NAME, FONT_SIZE, FONT_FLAGS
  </code></pre>
  
  <p>I am trying to check if reference in the TblLabels table exists in References table.</p>
  
  <p>This is the error I get:
  The And function expects a string or numeric expression for the 2 argument. A tuple set expression was used.</p>