COUNTROWS DAX Function in Power BI

The COUNTROWS DAX function counts the number of rows in the specified table, or in a table defined by an expression.

DAX Syntax COUNTROWS(‘table’)

Here the table parameter specifies the table of which we want to count the rows.

Example: Let’s create a measure which count the number of rows in the table Sheet10.

Suppose we have a table with the following data.

COUNTROWS dax function in Power BI

DAX

Count the rows = COUNTROWS('Sheet10')

The output of the above code can be shown in the card visual as shown in the image below:

COUNTROWS dax function in Power BI