The COUNT function is a power bi DAX statistical function which counts the number of rows in a table.
It returns a single integer value.
It ignores blank values in counting, allows only values of data types : String, Number and dates.
It does not support Boolean values (TRUE/FALSE).
The only argument allowed to this function is a column.
<column> is the column that contains the values to be counted.
Lets go through an example to see COUNT() Function in action.
Here we have a sample table which consist a registration data of students
Lets create a measure which use the count() function and returns total rows counts.
Count_Rows = Count(Registration[ID])
You can see, the measure output by dragging it into card visual that is 10.
Count() Function does not support boolean(TRUE/FALSE) values
To demonstrate this, Lets use Count() Function to count the Boolean values.
Here we have boolean column named as Flag, Lets see count () function with boolean column.
Count_boolean = COUNT(Registration[Flag])
Once you drag this measure to card visual, It gives an error as shown in below screenshot.
1,123 total views, 7 views today