title: Ranking a Measure Value (as opposed to a column value) in DAX?
body: <p><strong>Short version of question:</strong> how can I create a rank based on a calculated measure?</p>
  
  <p><strong>Question background:</strong>
  I have a table/query that yields many rows for each employee, with each row having a <code>time taken</code> value. </p>
  
  <p>I'd like to calculate the average time taken for each <code>employee</code>, and then present a table with a row for each <code>employee</code>, showing their <code>name</code>, average <code>time taken</code>, and <code>rank</code> (based on <code>time taken</code>). </p>
  
  <p>To do the first part, I created a measure called <code>AverageTimeLength</code> and set it equal to:</p>
  
  <pre><code>AverageTimeLength = Average(Table_name[Column_name]) 
  </code></pre>
  
  <p>Then I coded the following:</p>
  
  <pre><code>AverageTimeLength_employee = CALCULATE([AverageTimeLength], GROUPBY(Table_name, Table_name[EmployeeName]))
  </code></pre>
  
  <p>These two are measures; I was able to insert the second into the new table chart I'm creating, but unfortunately, I can't use <code>RANKX()</code> on it because the measure values don't come from a column. If I try to create a column derived from the measure (i.e., <code>column_name = [AverageTimeLength_employee]</code>) I just get an error accusing <code>column_name</code> of circular reasoning.</p>
  
  <p>What I want to do seems like it should be simple; does anyone know how I can create a simple rank parameter, to rank the measure values?</p>