enavuio
enavuio

Reputation: 1500

Trending Percentage over time

When I am trying to calculate a percentage over time with the rolling weighted denominator, what is that called? The calculation is basically

Users With WiFi Activity/Users

The line graph that I have is graphed daily on the x axis but at each day, it is only calculating the day of so the percentage is extremely lower, but what I want is on the line graph, on day, the percentage of WiFi users rolling 30 up to that day is this % vs only day x $.

Is that called a moving average?

Also, how is that calculate?

What Data should look like

Day  Percentage SUMTotalWiFiUsersRolling   SumTotalUsersRolling
8/1  85%        1800                      2000
8/1  81%        1700                      2100

What Tableau is doing

Day  Percentage SUMTotalWiFiUsersDayOnly   SumTotalUsersRolling
8/1  30%        600                               2000
8/1  35%        735                               2100

Upvotes: 1

Views: 71

Answers (1)

You're right, that is a moving average. MA since the day that you're fixing the 30 days period at is moving (each new day the window jumps by one day forward)

Is your data at the day level of detail? If so, this is the table calc you need:

WINDOW_AVG([SUMTotalUsersRolling],-29,0)

In the formula, we're starting at 29 days backwards from this day (0). So the 30 day average is including today

Formula format:

WINDOW_AVG(<field to average>,<number of periods to start from>,<period to end at>)

Upvotes: 1

Related Questions