Email : info@epmstrategy.com | Call Us Now : 479-321-3977
:: Home :: Sitemap ::

Power BI – Difference Between Count and Count Distinct

BY: David Rohlfs

Introduction

When you begin to learn about data and reporting, there can always be some vocabulary that is difficult to recognize. For a lot of people this can be realizing the differences between a Count and a Count Distinct.

In this blog we are going to define the differences between a count and a count distinct.

When to use it

When you are trying to recognize how large a field is, using a count can be the easiest way to see this. But using a distinct count can show the number of differences in the field.

A count is simply just a total count of the number of rows a field has. When you think of counting a column row by row, this is what a count is doing. One thing that you should note about a count is that it does count blank rows. For example, in this data there are several rows that are blank. But the top card still counts these rows as it would count a row with data.

But in the bottom card I created a simple DAX equation (Formula below the card) that filters out the blank values so that I am only counting the rows with data.

But what is the big difference between the count and distinct count? The difference is that a distinct count does not count the same value twice. So, if row one has the value “Coffee” and row two has the value “Coffee” the count would be two, but the distinct count would only be one. Here is an example of how this will look in a report.

Conclusion

While this is an easy concept to grasp, it needs to be a concept that you fully understand early on. Knowing the difference between the two types of counting can be the difference between selling ten products or selling a thousand products.