title: Need to calculate until a specific date in tableau?
body: <p>There are three columns, date, x, y</p>
  
  <p>I need to calculate the running sum/total of y for a specific date (today's date more specifically). The data is in two datasources and looks like this in first data source.</p>
  
  <pre><code>        DATE    X   Z
          5-Sep       
          6-Sep   26  101
          7-Sep   27  100
          8-Sep   28  99
          9-Sep   29  98
          10-Sep  30  98
          11-Sep  30  98
          12-Sep  30  97
          13-Sep  31  96
          14-Sep  32  95
          15-Sep  33  94
          16-Sep  34  93
          17-Sep  35  92
          18-Sep  35  92
  </code></pre>
  
  <p>and like this is second data source</p>
  
  <pre><code>        DATE    Y
          5-Sep   166
          6-Sep   182
          7-Sep   130
          8-Sep   93
          9-Sep   107
          10-Sep  95
          11-Sep  128
          12-Sep  173
          13-Sep  154
          14-Sep  136
          15-Sep  79
          16-Sep  61
          17-Sep  156
          18-Sep  66
  </code></pre>
  
  <p>Lets say that today's date is 17th Sep, then I need to calculate the running sum of 'Z' until today and display it next to the 'X' column. Something like this</p>
  
  <pre><code>        17-Sep  35  1499.
  </code></pre>
  
  <p>How do I do that? </p>
  
  <p>(I tried using sets with date by limiting the date to today but then the running sum doesn't work, also there are some errors in calculated field which is because the data is in two different sources)</p>
  
  <p>Please ask if need more clarification</p>