title: CURRENTMEMBER function gives an error in MDX
body: <p>I have my dimension as below: </p>
  
  <p><a href="https://i.stack.imgur.com/M7DL3.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/M7DL3.jpg" alt="Market Base Dimension"></a></p>
  
  <p>I want to get one market at a time.</p>
  
  <p>When I use this query, I am getting the list of all the members as I am using .MEMBERS function:</p>
  
  <pre><code>SELECT [MARKET BASE].[Market Base].[Market Base].MEMBERS ON 1,
  [Measures].[% OTC Sales] ON 0
  FROM [PharmaTrend Monthly Ext];
  </code></pre>
  
  <p>But when I use the following query to get only the current member then I get an error saying: <strong>The CURRENTMEMBER function expects a hierarchy expression for the 1 argument. A member expression was used.</strong></p>
  
  <pre><code>SELECT [MARKET BASE].[Market Base].[Market Base].CURRENTMEMBER ON 1,
  [Measures].[% OTC Sales] ON 0
  FROM [PharmaTrend Monthly Ext]; 
  </code></pre>
  
  <p><strong>UPDATE:</strong></p>
  
  <p>When I use the below query, I get the result with <code>All member</code>:</p>
  
  <pre><code>WITH 
  MEMBER [Market] AS
      [MARKET BASE].[Market Base].[Market Base].CURRENTMEMBER
  
  SELECT [Measures].[% OTC Sales] ON 0,
          [Market] ON 1
  FROM [PharmaTrend Monthly Ext];
  </code></pre>
  
  <p>How can I go about resolving this?</p>