Data Studio
1.7K members online now
1.7K members online now
Ask questions about Data Studio
Guide Me
star_border
Reply

Calculated Fields - Average Daily Pageviews

Visitor ✭ ✭ ✭
# 1
Visitor ✭ ✭ ✭

I'd like to calculate the average number of pageviews per day (month/year) using existing Metrics from Google Analytics. For instance, consider I selected a date range of 3 days with...

day 1: 10 Pageviews,

day 2: 20 Pageviews,

day 3: 25 Pageviews.

The caculated field should thus calculate as (10 PV + 20 PV + 25PV)/3 = 18,33

 

Can anyone provide me with the appropriate Syntax (or good source explaining calculated fields thoroughly)? I figure I should use something like this

Pageviews/DATE_DIFF(TODATE(end_time, 'JULIAN_DATE', %d'), TODATE(start_time, 'JULIAN_DATE', %d'))

,but the existing documentation is rather scarce. 

1 Expert replyverified_user

Calculated Fields - Average Daily Pageviews

Top Contributor
# 2
Top Contributor

Hi, you are better off using an arbitrary number for the number of days in the report, say 30 days by default, and use that to divide your total pageviews.

VP & Chief Evangelist at Hub'Scan | Contact me
Level 80 Digital Analytics Warrior, KPI Therapist and Keeper of the One True Tagging Plan

Calculated Fields - Average Daily Pageviews

Visitor ✭ ✭ ✭
# 3
Visitor ✭ ✭ ✭

Why is that? 30 days only averages correctly with that exact period of time. Anything but 30 days long months will be calculated incorrectly.