title: Tableau total average vs average per location
body: <p>Uploaded workbook on <a href="https://public.tableau.com/profile/sonihal#!/vizhome/NumericBusinessRatings/AvgperLocation" rel="nofollow">public tableau</a></p>
  
  <p>I understand how to chart average per location in Tableau, i.e. create calculated field</p>
  
  <pre><code>AVG([Rating])
  </code></pre>
  
  <p>And then plot this vs the location.</p>
  
  <p>But now, I am looking for average of ALL ratings, regardless of location, so I created calculated field</p>
  
  <pre><code>WINDOW_AVG([Avg_Rating], First(),Last())
  </code></pre>
  
  <p>If you see tab <code>Grand Average</code>, it equals 3.704, which I expect, calculated in EXCEL.</p>
  
  <p>But if you see tab <code>Avg per Location</code> and hover over the bars, you will see </p>
  
  <pre><code>Tot_Avg = 3.848
  </code></pre>
  
  <p>How on Earth did this happen?</p>