Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can Google Data Studio do time-series graphs at the hour level?

Every example of a time-series graph I've seen for Google Data Studio has a metric plotted per day. Is there any way to configure the granularity of the time axis (hour, month, etc)?

I want to show the count of events per hour throughout one day. My columns are in bigquery as types datetime:TIMESTAMP and count:INTEGER

like image 871
cmonkey Avatar asked Oct 05 '17 18:10

cmonkey


Video Answer


3 Answers

This is old, but its high in search results, and I found the correct answer here: https://www.en.advertisercommunity.com/t5/Data-Studio/Is-it-possible-to-aggregate-by-hour/td-p/1104815

Click the pencil next to the datasource, on your timestamp, click on the type column, and change "Date(YYYYMMDD" to another format, such as DATE HOUR("YYYYMMDDHH") to get hourly aggregation on the graphs.

like image 176
Brian Avatar answered Nov 11 '22 04:11

Brian


Edit: Based on new updates to Data Studio, @Brian's answer above is the correct one.

You can create a calculated field with the TODATE funciton. Example formula can be TODATE(source_field, 'SECONDS', '%Y%m%d%H'). Then this field should be marked as Date(YYYYMMDDHH) in the field editing screen.

like image 22
Minhaz Kazi Avatar answered Nov 11 '22 05:11

Minhaz Kazi


Now, there seems to be a straightforward way:

  1. Assuming that you have a Time Series plot, use Timestamp for your dimension and want to show hourly aggregated values.
  2. Select the dimension's preferences:

Edit the timestamp dimension

  1. Change Type to Date Hour

Select Date Hour type

like image 40
nocibambi Avatar answered Nov 11 '22 04:11

nocibambi