title: TABLEAU: calc field to get the last value available
body: <p>I'm using Tableau Desktop, my data are like this:</p>
  
  <pre><code>KPI,date,monthValue
  coffee break,01/06/2015,10.50
  coffee break,01/07/2015,8.30
  </code></pre>
  
  <p>and I want to build a table like this</p>
  
  <pre><code>KPI, year(date), last value
  coffee time, 2015, 8.30
  </code></pre>
  
  <p>How can I set a calculated field in order to show me the last value available in that year? I tried to do:</p>
  
  <pre><code>LOOKUP([MonthValue], LAST())
  </code></pre>
  
  <p>But it didn't work and tells me 'cannot mix aggregate and non-aggregate', so I did:</p>
  
  <pre><code>LOOKUP(sum([MonthValue]), LAST())
  </code></pre>
  
  <p>But it didn't work too. How should I proceed?</p>