title: Tableau - Calculated field for difference between date and maximum date in table
body: <p>I have the following table that I have loaded in Tableau (It has only one column <strong>CreatedOnDate</strong>)</p>
  
  <pre><code>+-----------------+
  | CreatedOnDate   |
  +-----------------+
  | 1/1/2016        |
  | 1/2/2016        |
  | 1/3/2016        |
  | 1/4/2016        |
  | 1/5/2016        |
  | 1/6/2016        |
  | 1/7/2016        |
  | 1/8/2016        |
  | 1/9/2016        |
  | 1/10/2016       |
  | 1/11/2016       |
  | 1/12/2016       |
  | 1/13/2016       |
  | 1/14/2016       |
  +-----------------+
  </code></pre>
  
  <p>I want to be able to find the maximum date in the table, compare it with every date in the table and get the difference in days. For the above table, the maximum date in table is 1/14/2016. Every date is compared to 1/14/2016 to find the difference.</p>
  
  <p><strong>Expected Output</strong></p>
  
  <pre><code>+-----------------+------------+
  | CreatedOnDate   | Difference |
  +-----------------+------------+
  | 1/1/2016        |         13 |
  | 1/2/2016        |         12 |
  | 1/3/2016        |         11 |
  | 1/4/2016        |         10 |
  | 1/5/2016        |          9 |
  | 1/6/2016        |          8 |
  | 1/7/2016        |          7 |
  | 1/8/2016        |          6 |
  | 1/9/2016        |          5 |
  | 1/10/2016       |          4 |
  | 1/11/2016       |          3 |
  | 1/12/2016       |          2 |
  | 1/13/2016       |          1 |
  | 1/14/2016       |          0 |
  +-----------------+------------+
  </code></pre>
  
  <p>My goal is to create this <strong>Difference</strong> calculated field. I am struggling to find a way to do this using DATEDIFF.</p>
  
  <p>And help would be appreciated!!</p>