title: Dax calculated column, vlookup max value
body: <p>The goal is for the power pivot table to only show pricing information that corresponds with the last time stamp, all necessary data is in one table.</p>
  <p>In normal excel, I would try to solve the problem with a vlookup.</p>
  <p>I have tried the below calculated column (along with others) which did not work.  The results is that it reflects the time stamp for that row, not the max time of that day, which then does not provide the desired results on the power pivot.</p>
  <pre><code>column =
  CALCULATE ( MAX ( TabName[Effective Time] ), ALL ( TabName ), TabName[Result] )
      = MAXX (
          FILTER (
              TabName,
              EARLIER ( TabName[Effective Time] ) = TabName[Effective Time]
          ),
          TabName[Result]
      )
  </code></pre>
  <p>Here is a example of the output I'm looking for.</p>
  <p>For the blue paint product there are two times, 5:00 and 17:00.</p>
  <p>It finds the latest time (17:00) and outputs it in the calculated column.</p>
  <p>Then repeats grabbing the latest price for each individual product.</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>Date</th>
  <th>Effective Time</th>
  <th>Product</th>
  <th>Price</th>
  <th>Desired Calculated Column</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>7/13/2021</td>
  <td>5:00</td>
  <td>Blue Paint</td>
  <td>2.00</td>
  <td>17:00</td>
  </tr>
  <tr>
  <td>7/13/2021</td>
  <td>12:00</td>
  <td>Green Paint</td>
  <td>3.00</td>
  <td>16:00</td>
  </tr>
  <tr>
  <td>7/13/2021</td>
  <td>17:00</td>
  <td>Blue Paint</td>
  <td>3.00</td>
  <td>17:00</td>
  </tr>
  <tr>
  <td>7/13/2021</td>
  <td>16:00</td>
  <td>Green Paint</td>
  <td>2.00</td>
  <td>16:00</td>
  </tr>
  <tr>
  <td>7/13/2021</td>
  <td>5:00</td>
  <td>Red Paint</td>
  <td>4.00</td>
  <td>11:00</td>
  </tr>
  <tr>
  <td>7/13/2021</td>
  <td>11:00</td>
  <td>Red Paint</td>
  <td>4.00</td>
  <td>11:00</td>
  </tr>
  </tbody>
  </table>
  </div>