COUNT

Updated on

COUNT is a DAX function that counts the numbers in a column.

Syntax

COUNT( ColumnName )
Argument Properties Description
ColumnName The column that contains the numbers to be counted.

Return Values

A whole number.

Remarks

  • The only argument allowed to this function is a column. The COUNT function counts rows that contain the following kinds of values:

    • Numbers
    • Dates
    • Strings
  • When the function finds no rows to count, it returns a blank.

  • Blank values are skipped. TRUE/FALSE values are not supported.

  • If you want to evaluate a column of TRUE/FALSE values, use the COUNTA function.

  • This function is not supported for use in DirectQuery mode when used in calculated columns or row-level security (RLS) rules.

  • For best practices when using COUNT, see Use COUNTROWS instead of COUNT.

Example

The following example shows how to count the number of values in the column, ShipDate.

= COUNT([ShipDate])

To count logical values or text, use the COUNTA or COUNTAX functions.

Other functions related to COUNT are:

Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/dax/count-function-dax

2023-2024 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy