title: How can I aggregate based on min date but only after a dimension filter has been applied on all dates?
body: <p>I’m trying to aggregate rows for the same ID based on their max date, but only within the current filter (I am filtering by date range). I know this has something to do with Level of Detail calculations (FIXED, INCLUDE) but I can’t quite get it.</p>
  <p>The data looks like</p>
  <pre><code>ID: 1 | collection_date=2019-01-01
  ID: 1 | collection_date=2020-02-01
  ID: 1 | collection_date=2020-03-01
  ID: 2 | collection_date=2018-01-01
  ID: 2 | collection_date=2020-09-01
  </code></pre>
  <p>I am applying a dimension filter which only returns dates within the year <code>2020</code>.</p>
  <p>If I try <code>{ FIXED [ID]:MIN([collection_date]) }</code> then the record for <code>2019-01-01</code> is returned as the MIN and no records are returned for the final view.</p>
  <p>The <code>FIXED</code> selects the <code>2019-01-01</code> filter before the dimension filter attempts to select only things from 2020 and comes up empty.</p>
  <p>My expected output is all records which have the max date within the range for their <code>ID</code></p>
  <pre><code>ID: 1 | collection_date=2020-02-01
  ID: 2 | collection_date=2020-09-01
  </code></pre>