In this Explore recipe, you’ll learn how to create several different reports on article views in your knowledge base, including views within 30 days of article creation. You’ll also learn how to create a dashboard with filters and bookmarks that help you quickly focus on the information you’re interested in.
This article contains the following topics:
- What you’ll need
- Creating the standard calculated metric
- Creating the queries
- Creating the dashboard
What you’ll need
Skill level: Moderate
Time required: 30 minutes
- Zendesk Explore Professional or Enterprise
- Editor or Admin permissions (see Giving agents access to Explore)
- Article data in Zendesk Guide
Creating the standard calculated metric
The queries in this recipe make use of a standard calculated metric that returns the number of views that occurred within the first 30 days after an article was created. This information is useful if you have articles that are most relevant immediately after publication, like announcements or product release notes.
You can still follow this recipe without creating the standard calculated metric. In that case, you’ll just be reporting on total article views instead.
To create the standard calculated metric
- In Explore, click the query (
) icon.
- In the Queries library, click New query.
- On the Choose a dataset page, click Guide > Knowledge Base > Guide: Knowledge Base, then click New query. Query builder opens.
- Click the Calculations (
) menu > Standard calculated metric.
- Name this metric Days between creation and view.
- In the Formula field, enter the following:
DATE_DIFF([Views - Date],[Article created - Date],"nb_of_days")
Tip: If you're working in a language other than English, read this article to help you enter Explore formulas in your language. - Click Save.
- Click the Calculations (
) menu > Standard calculated metric.
- Name this metric Views within 30 days of creation.
- In the Formula field, enter the following:
IF (VALUE(Days between creation and view) <= 30) THEN
SUM(Views)
ENDIF - Click Save.
Creating the queries
This recipe covers the following example queries:
- Summary of views by article
- Views by article over time
- Monthly views for all articles
- Views by article
Summary of views by article
This query is a table that lists the articles in your help center, how many views each article has, and how many of those views happened within 30 days of the article’s creation.
To create the query
If you created the metric above and are already in Query builder, skip to step 4.
- In Explore, click the query (
) icon.
- In the Queries library, click New query.
- On the Choose a dataset page, click Guide > Knowledge Base > Guide: Knowledge Base, then click New query. Query builder opens.
- In the Metrics panel:
- Click Add > Article views > Views, using the SUM aggregator.
- Click Add > Calculated metrics > Views within 30 days of creation, using the COUNT aggregator.
- In the Rows panel:
- Click Add > Articles > Article ID.
- Click Add > Articles > Article Title.
- Click Add > Time - Article created > Article created - Date.
- Click the Result manipulation (
) menu > Result metric calculation > Add a new metric.
- Name the metric % of views within 30 days.
- In the Formula field, enter the following:
COUNT(Views within 30 days of creation)/SUM(Views)
- Click Add.
- Name your query Summary of views by article.
- Click Save.

Views by article over time
This query is a line graph that shows, for a selected article, how many views the article received each month (light blue), and how many of those views happened within 30 days of article creation (dark blue).
To create the query
- In Explore, click the query (
) icon.
- In the Queries library, click New query.
- On the Choose a dataset page, click Guide > Knowledge Base > Guide: Knowledge Base, then click New query. Query builder opens.
- In the Metrics panel:
- Click Add > Article views > Views, using the SUM aggregator.
- Click Add > Calculated metrics > Views within 30 days of creation, using the COUNT aggregator.
- In the Columns panel:
- Click Add > Time - Article views recorded > Views - Year.
- Click Add > Time - Article views recorded > Views - Month.
- In the Rows panel:
- Click Add > Articles > Article ID.
- Click Add > Articles > Article Title.
- Name your query Views by article over time.
- Click Save.
To see results for an article, click an article ID to the left of the line graph and then click the corresponding article title (it will be the only one in black text) beneath it.
Monthly views for all articles
This query is a column chart that shows how many views all of the articles put together in your help center received each month (light blue), and how many of those views happened within 30 days of article creation (dark blue).
To create the query
- In Explore, click the query (
) icon.
- In the Queries library, click New query.
- On the Choose a dataset page, click Guide > Knowledge Base > Guide: Knowledge Base, then click New query. Query builder opens.
- In the Metrics panel:
- Click Add > Article views > Views, using the SUM aggregator.
- Click Add > Calculated metrics > Views within 30 days of creation, using the COUNT aggregator.
- In the Columns panel:
- Click Add > Time - Article views recorded > Views - Year.
- Click Add > Time - Article views recorded > Views - Month.
- Name your query Monthly views for all articles.
- Click Save.
Views by article
This query is another column chart that shows how many total views each individual article in your help center received (light blue), and how many of those views happened within 30 days of article creation (dark blue).
To create the query
- In Explore, click the query (
) icon.
- In the Queries library, click New query.
- On the Choose a dataset page, click Guide > Knowledge Base > Guide: Knowledge Base, then click New query. Query builder opens.
- In the Metrics panel:
- Click Add > Article views > Views, using the SUM aggregator.
- Click Add > Calculated metrics > Views within 30 days of creation, using the COUNT aggregator.
- In the Columns panel:
- Click Add > Articles > Article ID.
- Click Add > Articles > Article Title.
- Name your query Views by article.
- Click Save.
Creating the dashboard
Now that you’ve created your individual queries, you’ll create a dashboard where you can see all of the queries in this recipe together. Then you’ll add dashboard filters and bookmarks that let you quickly hone in on specific segments of your results. Finally, you’ll publish your dashboard and share it with others.
To create the dashboard
- In Explore, click the dashboard (
) icon.
- In the Dashboards library, click New dashboard.
- Click Add > Add query.
- Find and select the four queries you created earlier:
- Summary of views by article
- Views by article over time
- Monthly views for all articles
- Views by article
- Click Add queries.
- Reposition the queries so that they’re arranged how you want them on the dashboard. For help, see Adding and arranging dashboard widgets.
To add dashboard filters
- With your dashboard still open, click Add > Add data filter.
- Find and select the attributes you want to be able to filter the dashboard’s results by. Some recommendations are:
- Article section ID
- Article locale
- Views locale
- Article created date
- Click Apply.
- Reposition the filters so that they’re arranged how you want them on the dashboard. For help, see Adding and arranging dashboard widgets.
To add bookmarks
- With your dashboard still open, apply the filters you just added so that the dashboard’s results are focused on a particular subset of the data that you’re interested in. For example, you might want to see only articles in a specific section, or only views that originated from a certain locale.
- With your filters applied, click Add > Add bookmark.
- Click Create bookmark from current state.
- Rename the bookmark to something descriptive.
- Click Close.
To publish and share the dashboard
- With your dashboard still open, give it a descriptive name.
- Click Publish.
- Share your dashboard with others as needed. For help, see Sharing dashboards.
6 Comments
Hi I tried creating the metric Views within 30 days of creation but received an error.
Hi Anjie Nambiar, that error message (The set of calculations isn't valid) typically means that you need to be in a different dataset for the metric you're building to work. Can you check to make sure you're in the Guide: Knowledge Base dataset?
Hi Erin, yes I am. The metric 'Days between creating & view' works but not the 'Views within 30 days of creation'.
As I can see you are indeed using the correct dataset. I would like to look into this further and I'll create a ticket for you. Let's continue our conversation there.
Cheers,
Dane
Hi Erin,
Thanks for sharing this—it's very helpful.
I'm wondering if the reverse is possible, too: Articles that haven't been viewed within X time of creation?
Hi Ryan Oakman, I'm glad these reports are helpful! Your question raises an excellent point—how to find articles with no views. So I put together a new recipe, Finding articles with no views, that addresses this.
But to answer your question more specifically, to find articles that haven't been viewed within X time of creation, follow the instructions in the recipe linked above, but instead of using the Views computed separately calculated metric from that recipe, use the Views within 30 days of creation calculated metric from this recipe (and also make sure to select the Compute separately check box). That should show you exactly the articles you're looking for!
Please sign in to leave a comment.