3 Replies Latest reply on Apr 7, 2018 7:56 PM by Mike Mainzer

# Rolling Average Not the Same as Raw Average

Hey folks, I'm having an issue with what is being displayed for the rolling average. I'm doing visuals on the National Hockey League, and I'm trying to display the number of goals each team is scoring per 60 minutes of ice time. When I plot every team in the league, Tableau is displaying a calculated average of 11.1, when in reality the league average is about 7.3

I checked data points in a team by team basis as well. For example, the entry for April 5th for Nashville (NSH) shows a calculated rolling average of 19.4, when in reality the actual average for that date is 16.4

Here is a link to the WB

Tableau Public 10.5

• ###### 1. Re: Rolling Average Not the Same as Raw Average

Well an average and a moving average should be different, as they are different calculations.

However, to see where the problem is we'd need to see the data itself. What's your source? Also, where are you getting the true averages about the nhl from?

• ###### 2. Re: Rolling Average Not the Same as Raw Average

If I go to this link Corsica | Team Query  I can query each teams data game by game. If you turn the aggregate button off and run the date range 10/1/17 to today you can get all current data in a csv then I of course saved it as an excel file.

I have one but dont think I can upload it here.

Just as an example if I set the table calculation to show me a moving average of the last (5) and next (0) I have the following data points for time and goals scored

3/27/18     7.85 TOI 0 Goals

3/29/18     7.10 TOI 0 Goals

3/31/18     2.73 TOI 1 Goal

4/1/18       2.43 TOI 1 Goal

4/3/18       0.00 TOI 0 Goals

So I have a total of 20.11 minutes and 2 goals. So if I turn this into a rate stat per 60 minutes the calculation would be (60/20.11)*2=5.97, but the value I get on 4/5/18 is 19.4!

• ###### 3. Re: Rolling Average Not the Same as Raw Average

What if you change your measure to an average? It's currently set to sum, meaning it's getting your averages, and then summing them.

Also, your calculation in the workbook is (goals/time)*60, yet in your comment above you say the calculation is (60/time)*goals. I'm not sure what you're looking to do, but that may also be an issue.