In Explore, I created a report and added a tag attribute in the Filters panel. But when I filter my report by multiple tags at the same time, the values of my metrics increase in an unexpected way. What’s causing the increase?
Reporting on multiple tags in the Filters panel results in unexpected behavior if you’re not familiar with Explore’s behind-the-scenes calculations. As an alternative, create a calculated attribute with a formula specifically designed to find multiple tags. See the section Finding tickets with multiple tags in the article Reporting with tags.
The increase in metric values described above occurs because of the way Explore uses attributes to slice metric results. To understand what’s going on, let’s look at what happens when an attribute is added in the Rows panel, and then in the Filters panel.
Explore performs the same calculations when an attribute is added in the Rows (or Columns) panel as it does when an attribute is added in the Filters panel. However, the former results in a visible change to the report while the latter does not. This makes it difficult to understand what’s happening behind the scenes.
When a tag is added to the Rows panel, the results look like this:
In the report above, the Ticket tags attribute has been added to the Rows panel and filtered by two values (“apple” and “banana”). You can see that there are two tickets, each of which has both tags. Explore breaks the results out into three columns: the first shows the two tickets, the second shows the two tags (repeated for each ticket), and the third showing that each tag is present on each (1) ticket.
However, if you remove the Ticket ID attribute and move the Ticket tags attribute to the Filters panel, the results look like this:
In this report, the Ticket tags attribute is still filtered on the “apple” and “banana” values. Here, Explore is calculating the number of tickets that each tag is added to (2 tags x 2 tickets = 4 tickets). In other words, it’s summing the values from the third column in the first version of the report. This result is not intuitive to users unfamiliar with Explore’s calculations and can cause confusion or incorrectly reported data.
To avoid wrongly aggregated results, you can do one of the following instead:
- Create a calculated attribute. You can create a calculated attribute with a formula specifically designed to find multiple tags. For help, see the section Finding tickets with multiple tags in the article Reporting with tags.
- Use the D_COUNT aggregator. For count-based metrics (like the number of tickets), you can use the D_COUNT aggregator, which always reflects unique values. For help, see the article Choosing metric aggregators. However, this doesn’t work for time-based metrics (like first reply time) or other aggregators (like SUM, AVG, and MED).
- Filter by one tag at a time. Depending on your reporting needs, you can filter your report by just one tag at a time. However, this doesn’t work if your use case relies on finding tickets that must have multiple tags.
Please sign in to leave a comment.