Difference between Power BI Count and Count Distinct

preview_player
Показать описание
In Power BI, "Count" and "Count Distinct" are both measures that allow you to count the number of rows in a table, but they are used for different purposes and produce different results.

"Count" will count all of the rows in a table, regardless of whether they have duplicate values. So, if you have a table with 10 rows and 5 of them have duplicate values, "Count" will return 10 as the result.

"Count Distinct" will only count the unique values in a table. So, if you have a table with 10 rows and 5 of them have duplicate values, "Count Distinct" will return 5 as the result.

For example, if you have a table of sales, and you want to know how many customers made a purchase, you would use "Count Distinct" to get the number of unique customers. While if you want to know how many sales were made, you would use "Count" to get the total number of transactions.

In summary, "Count" will count all the rows of a table, while "Count Distinct" will count only unique values.
Рекомендации по теме