How to display YouTube video published date in Looker Studio

PUBLISHED 25 May 2023 - UPDATED 15 Aug 2023

Looker Studio's YouTube integration doesn't include a 'Date Published' field. But it's possible to create one yourself as a calculated field. Here's how!

A while back, I wrote an article on exporting YouTube video data using Looker Studio (formerly Google Data Studio). One of the commenters on that article asked:

How do I basically summarize all of the views for the video while being able to see the video's publishing date in the report?

This is such a great question that I thought it deserved its own article: this one.

I'm going to assume you've already created a Looker Studio report and added your YouTube channel as a new data source. If you haven't, then please follow the instructions on my previous article.

What about the existing 'Date' field?

The YouTube Analytics data source does have a 'Date' field out of the box (as well as 'Date Time'), but this is the date that any activity took place. So for example, if you create a simple chart with Video Title and Date as dimensions, and Views as the metric, you'll get something like this:

Looker Studio chart with date field and YouTube data

This tells me that the video got 5 views on 5 May, 1 view on 6 May, and so on. This could be useful, but it doesn't tell me when the video was published.

However, knowing the first day that each video received a view would be a great proxy for the video 'Published Date' (as almost all videos receive their first view on the day they were published).

So, although the YouTube Analytics data source doesn't have a 'Published Date' field, we can effectively create one using the information in the 'Date' field.

This new field can either be a chart field on one particular chart, or a calculated field within your data source that can be applied to lots of different charts. Let's look at each approach in turn.

Approach 1: Create 'Published Date' as chart field

  1. In Looker Studio, main menu, go to Insert > Table and add a table to your report
  2. Click on the table - you should see the Chart properties panel on the right, with the SETUP tab selected
  3. Check that 'Data source' is set to 'YouTube Analytics'
  4. Under 'Dimension', click Add dimension
  5. Click CREATE FIELD
  6. Give your new Field a name, e.g 'Published Date'
  7. Paste the following formula into the 'Formula' box:

PARSE_DATE("%Y%m%d",MIN(Date))

  1. After a moment you should get a green tick to indicate the formula does not have any errors:

Create Field panel in Looker Studio with formula pasted in and green tick

  1. Leave type set to Text
  2. Click APPLY

The formula does two things. First, it takes the Date field and uses MIN() to find the minimum value (i.e. the oldest date, the first day that the video received a view).

This is returned as a numeric output (i.e. a number), which would be usable but not really what we want. So the formula then uses PARSE_DATE() to turn that number back into a date.

NB: Although Looker Studio defaults to a type value of 'Text' for this new field when you are creating it, if you edit it again you will see that Looker Studio has correctly set it to 'Date'. So no need to worry about that.

Approach 2: Create 'Published Date' field in data source

  1. In the Looker Studio main menu, go to Resource > Manage added data source
  2. Click the EDIT action for your YouTube Analytics data source
  3. Click ADD A FIELD (in the top right)
  4. Give your new field a Field Name, eg 'Published Date'
  5. Paste the following formula into the 'Formula' box (it's the same formula in either approach):

PARSE_DATE("%Y%m%d",MIN(Date))

  1. After a moment you should get a green tick to indicate the formula does not have any errors:

Calculated field in Looker Studio with no errors in formula

  1. Click SAVE
  2. Click DONE
  3. Click CLOSE

Using your new 'Published Date' field

Whichever of the two methods given above that you followed, you can use your new Published Date field in your chart:

  1. Click on the chart in your Looker Studio report
  2. In the Chart properties panel, Setup tab, click Add dimension
  3. Add 'Video Title' and 'Published Date' as dimensions
  4. Again in the Chart properties panel, Setup tab, click Add metric
  5. Add 'Views' as the metric. You should end up with this:

Dimensions and Metrics selected for YouTube chart in Looker Studio

Important: selecting the correct date range

There's one final step, and that's to make sure that the date range of the chart covers the entire life of your YouTube channel. If it doesn't, then the Published Date won't be as expected.

For example, if you are only looking at the last 28 days, the oldest view in that period will be at most 28 days ago, rather than when the video was first published. So:

  1. Again in the Chart properties panel, SETUP tab, scroll down to Default date range
  2. Click on Custom
  3. Click on the dropdown immediately below Custom
  4. Choose a Start Date and End Date from this date picker:

Date picker in Looker Studio

Personally, I prefer to use the dropdown in the top-right of the date picker and go to Advanced. I then set the Start Date to Today Minus 10,000 Days and the End Date to Today Minus 1 Days.

This covers the entire life of my channel and means I won't have to update the date range at all in future (unless I am using Looker Studio for another 25 years):

Date picker in Looker Studio set to Advanced

Once you've configured your chart dimensions and metrics, and chosen your date range, the chart in your report will look something like this:

Chart in Looker Studio listing YouTube videos with published date and total views

As you can see, the chart lists each video in your channel, along with its total number of views and its published date (AKA the date that it received its first view). Success!

(And yes, the Technically Product YouTube channel only has three videos at the moment... let's just say I'm working on it.)

Subscribe
Notify of
guest
10 Comments
Oldest
Newest
Inline Feedbacks
View all comments
ROSALYN
ROSALYN
10 months ago

Thank you, this was very helpful! What about if we wanted to do how many days the video has been live?

ROSALYN
ROSALYN
10 months ago
Reply to  James Clark

Thank you SO much for getting back to me!! Really appreciate your help.

I am still stuck and not sure where my issue is.

When I copy your formula above "Published Date" doesn't appear and when I do the PARSE_DATE which you explained above it pulls a random number that isn't correct. This is the formula: DATETIME_DIFF(TODAY(), PARSE_DATE("%Y%m%d",MIN(Date)), DAY)

Thanks again for your help!

Andres
Andres
5 months ago

Hi James, thank you very much for you article, I have another question: Is there a way to display the original video published date and the views form a specific time period in the same chart? For example: I have a video that was published 2 years ago, and I want my chart to display the name of the video, the original published date, and the number of views for last week.

Andres
Andres
4 months ago
Reply to  James Clark

Thank you very much!

It works perfectly!

Andres
Andres
2 months ago

Hi James, excellent post!

I was wondering if there is a way to add up a metric from more than 5 data sources, I currently manage 6 YouTube Channels and I need to display the total views of all the channels. When I had just 5 channels there was no problem as I could just blend them all and get the views count, but it is not possible to blend more than five sources so I can't do that anymore and don't really know how to do it.

It would be great if you had a solution for this, and could share it with me.

Thank you!

Andres
Andres
2 months ago
Reply to  James Clark

Thanks for your help, I'll let you know if I find a solution!

Last edited 2 months ago by Andres
James Clark
Hi! I'm James Clark and I'm a freelance web analyst from the UK. I'm here to help with your analytics, ad operations, and SEO issues.
10
0
What do you think? Leave a commentx
linkedin facebook pinterest youtube rss twitter instagram facebook-blank rss-blank linkedin-blank pinterest youtube twitter instagram