title: Max partition by DAX measure equivalent?
body: <p>In DAX/Power BI, I wondering if it is possible to create an aggregate calculation on a subset of data within a dataset.</p>
  
  <p>I have a listing of customer scores for a period of time, e.g.</p>
  
  <pre><code>date,   customer, score
  -----------------------
  1.1.17, A,        12
  2.1.17, A,        16
  4.1.17, B,        10
  5.1.17, B,        14
  </code></pre>
  
  <p>I would like to identify to Max date per customer eg.</p>
  
  <pre><code>date,   customer, score, max date per client
  -------------------------------------------
  1.1.17, A,        12,    2.1.17
  2.1.17, A,        11,    2.1.17
  4.1.17, B,        10,    5.1.17
  5.1.17, B,        14,    5.1.17
  </code></pre>
  
  <p>The SQL equivalent would something like-</p>
  
  <pre><code>MAX(date) OVER (PARTITION BY customer).
  </code></pre>
  
  <p>In DAX/Power BI I  realise that a calculated column can be used in combination with EARLIER but this will not be suitable because the calculated column is not responsive to filtering from a slicer. I.e I would like to find the MAX date per client as illustrated above for a filtered date range controlled from a slicer and not for the full data set which is what a calculated column does.  Is such a measure possible?</p>