title: DAX How to return Nth selected item
body: <p>I'm trying to find the Nth selected item from a list of text values that are used in a filter.  I cannot find a good solution that will do this.  Below is what I currently have (in DAX Studio)</p>
  <pre><code>//First get all of the Selected Scenarios and then Rank them based on alphabetical names
  //Then filter the Rank to the specific one that I want
  
  Define
  var Scenarios = 
  Filter(
      AddColumns(ALLSELECTED('Financial All Scenarios'[Scenario]),
      &quot;Rank&quot;, RANKX(
          ALLSELECTED('Financial All Scenarios'[Scenario]), 
          'Financial All Scenarios'[Scenario], 
          , 
          ASC
      )
  ), 
  [Rank] = 2)
  
  //Return just the Scenario value for the row that is returned above.
  EVALUATE(
  
  MinX(Scenarios, [Scenario])
  //Scenarios
  )
  </code></pre>
  <p>The above gives me the error of the expression specified in the query is not a valid table expression.</p>
  <p>I'm note sure why or of another way to get this to work.</p>