Reporting on tags can be useful for many different reasons from time to time. We're going to show you how to create an easy report which displays the tag usage across the last 4 months; whilst also colourising your report results.
Our example report is designed to colour the table cells in the event the total is:
- > 50 - Greater than 50 - Purple
- > 25 - Greater than 25 - Blue
- > 10 - Greater than 10 - Green
- < 10 - Less than 10 - No colour
What you'll need
Skill level: Beginner
Time Required: 55 minutes
- Zendesk Explore Professional or Enterprise
- Editor or Admin permissions (see Giving agents access to Explore)
- Tag data in Zendesk Support
Creating the query
To create the query
- In Explore, navigate to the Queries library by clicking the query () icon.
- Click New query.
- On the Choose a dataset page, click Support > Tickets > Support: Tickets, then click New query. The query builder will open for you.
-
In the Metrics panel, click Add.
-
From the list of metrics, choose Tickets > Tickets then click Apply.
- In the Rows panel, click Add.
- From the list of attributes, choose Tickets > Ticket Tags then click Apply.
- In the Explosions panel, click Add.
- From the list of attributes, choose Time - Ticket Created > Ticket Created - Month then click Apply.
- In the Filter panel, click Add.
- From the list of filters, choose Time - Ticket Created > Ticket Created - Month then click Apply.
- Click on the new filter which you have just added and click Edit date ranges.
The query is complete - with very basic formatting e.g no colours
Adding colours to your report
-
From the Chart configuration () menu, click Display format.
-
On the Display format page, change the format from Standard to Advanced.
- The Advanced Formatting window will now appear to make the colour customisations.
You can copy and paste the below to overwrite the original code if you like:
IF (COUNT(Tickets) > 49) THEN
{
"backgroundColor": "#D7BDE2",
"precision": 0,
"scale": 1,
"prefix": "",
"decimalSeparator": ".",
"italic": FALSE,
"bold": FALSE,
"suffix": "",
"fontColor": "#000",
"thousandsSeparator": " "
}
ELIF (COUNT(Tickets) > 24) THEN
{
"backgroundColor": "#AED6F1"
}
ELIF (COUNT(Tickets) > 9) THEN
{
"backgroundColor": "#A3E4D7"
}
ELSE
{
"fontColor": "#777777"
}
ENDIF
What you'll need to update in the SQL code above:
- Count values:
- > 49
- > 24
- > 9
- Note: The count values are set to -1 of the desired colour range noted at the start of this guide.
- "backgroundColor" hex code
- This is the colour of the table cell. You will need the hex code of the colour which you would like the table cells to be.
Additional Formatting:
- Update Header Background Colour: Chart Configuration > Colours > Header Colour > Colour Picker
- Update Header Font Colour: Chart Configuration > Chart > Header Style > Colour Picker
- Format Month Title: Chart Configuration > Explosions > Title Style > Bold
Final Result: