Creating a rolling average/window average in tableau

4.4k views Asked by At

I'm struggling to create a rolling 7 day average in tableau using the calculation below. I can get it to work correctly when I focus on a monthly average but not when I calculate a daily average. The daily is not calculating correctly until there are enough periods to calculate the average correctly.

In order to look at year over year comparisons, I'm using a calculated field to estimate the day of year. Could this be throwing off the window_avg and/or the level at which the calculation is being performed?

WINDOW_AVG(SUM(widgets), -6, 0)

Thanks Mark

1

There are 1 answers

0
cmcau On

I can't reproduce your problem using the Sample database. What I get is avg of month 1 = total of month 1, then it averages for the available months. I think your additional calculation must be interfering with the avg result.