- 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 - COUNTX function
Description
Counts the number of rows that contain a number or an expression that evaluates to a number, when evaluating an expression over a table.
Syntax
COUNTX (<table>, <expression>)
Parameters
Sr.No. | Parameter & Description |
---|---|
1 |
table The table containing the rows to be counted. |
2 |
expression An expression that returns the numbers you want to count. |
Return Value
Returns a whole number.
Remarks
The COUNTX function counts only numeric values or dates. Parameters that are logical values or text that cannot be translated into numbers are not counted.
If the function finds no rows to count, it returns a blank. When there are rows, but none meets the specified criteria, then the function returns 0.
Example
= COUNTX (RELATEDTABLE (East_Sales), IF ([Product] = East_Sales[Product],1,0))
dax_functions_aggregation.htm
Advertisements