- DAX Functions Tutorial
- DAX Functions - Home
- DAX Functions - Introduction
- DAX Parameter Naming Conventions
- Description Structure
- DAX Functions - Aggregation
- DAX Functions - Filter
- DAX Functions - Time Intelligence
- DAX Functions - Date and Time
- DAX Functions - Information
- DAX Functions - Logical
- Math & Trigonometric Functions
- DAX Functions - Parent & Child
- DAX Functions - Statistical
- DAX Functions - Text
- DAX Functions - Other
- DAX Functions Useful Resources
- DAX Functions - Quick Guide
- DAX Functions - Useful Resources
- DAX Functions - Discussion
DAX Aggregation - COUNTROWS function
Description
Counts the number of rows in the specified table, or in a table defined by an expression.
Syntax
COUNTROWS (<table>)
Parameters
Sr.No. | Parameter & Description |
---|---|
1 |
table The name of the table that contains the rows to be counted, or an expression that returns a table. |
Return Value
Returns a whole number.
Remarks
This function can be used to count the number of rows in a base table, but more often is used to count the number of rows that result from filtering a table, or applying a context to a table.
Example
= COUNTROWS (CALENDAR (DATE (2016,8,1), DATE (2016,10,31))) returns 92. = COUNTROWS (Results) returns 34094. = COUNTROWS (Events) returns 995.
Remarks
You can use columns containing any type of data, but only blank cells are counted. Cells that have the value zero (0) are not counted, as zero is considered a numeric value and not a blank.
Example
= COUNTBLANK (SalesTarget[SalesTarget])
dax_functions_aggregation.htm
Advertisements