Count Unique Values in Power BI using DISTINCTCOUNT

In this tutorial, I will show you the usage of COUNT and DISTINCTCOUNT functions as Power BI measure. COUNT function can be used to get the total count and DISTINCTCOUNT function can be used to get the unique count.

Step 1: Follow this tutorial and load the Excel sheet to the Power BI: Download sample Excel data file.

Step 2: Right-click on one of the field and select "New Measure"





Step 3: Wright the COUNT function

Measure = COUNT(Sheet1[Name])

As you can see, when you type the function, it will show,
  • What function does
  • Sample format of the function

Step 4: Drag and drop the Measure to the working area. And select 'Card' visualization option

Here is the output of COUNT function,



Step 5: Now change COUNT function to DISTINCTCOUNT

Measure = DISTINCTCOUNT(Sheet1[Name])




Here is the output of DISTINCTCOUNT function,

Comments