Question

I see both COUNT and D_COUNT as options for aggregation. Which one should I use?

Answer

COUNT and D_COUNT are ways to aggregate data. Data aggregation is the process to combine a list of items into one data point. For example, SUM is an aggregation that adds the listed values together.

COUNT counts the number of items to aggregate. D_COUNT counts the number of unique items to aggregate. Consider the list below:

  • Cat
  • Cat
  • Dog
  • Bird

If you aggregate the list above by COUNT, the list shows the result of 4 because there are four items. If you aggregate the same list by D_COUNT, the list provides a result of 3 because two items are the same. The most common use for COUNT and D_COUNT in Explore is to aggregate ticket IDs. D_COUNT ensures each ticket shows up only once. COUNT allows a ticket to count multiple times.

If a report has attributes in rows or columns, COUNT and D_COUNT are aggregated within each cell, not for the report as a whole. From the example above, imagine that "Cat," "Dog," and "Bird" are tags, and they're arranged on three tickets:

  • Ticket 1: Cat
  • Ticket 2: Cat, Dog
  • Ticket 3: Bird

COUNT and D_COUNT for tickets both return three because there are three tickets. However, if tags are added under rows, the total changes:

  • Cat: 2 tickets
  • Dog: 1 ticket
  • Bird: 1 ticket

The total is 4, even though there are only three tickets. This is because two unique tickets have the "Cat" tag. If a report has multiple rows or columns, the sum of D_COUNT values can be higher than the D_COUNT without rows or columns.

For more information on the different reporting and analytics aggregators, see Choosing metric aggregators.

Powered by Zendesk