title: Using WINDOW_SUM formula with each row in Tableau
body: <p>I have a migration from excel to Tableau. In Tableau I want to create some calculate field :</p>
  
  <pre><code>            Cant Calculation
               10  1.982332155
               14  1.939929329
               17  1.885159011
               20  1.819787986
                .
                .
  Grand Total  566
  </code></pre>
  
  <p>Calculation (excel) : =+(SUMA(A2:$A$11)+SUMA(A3:$A$11))/$A$12 </p>
  
  <p>The problem is in Tableau, repeat the calculate field in all the column.</p>
  
  <pre><code>            Cant Calculation
               10  1.982332155
               14  1.982332155
               17  1.982332155
               20  1.982332155
                .
                .
  Grand Total  566
  </code></pre>
  
  <p>I've tried with this calculation: </p>
  
  <pre><code>(WINDOW_SUM(SUM([Cant]),FIRST(),LAST())+ WINDOW_SUM(SUM([Cant]),FIRST()+1,LAST()))/TOTAL(sum([Cant]))
  </code></pre>
  
  <p>Thanks for your help.</p>