Please note javascript is required for full website functionality.

Blog

Power Pivot Principles: The A to Z of DAX Functions – COUNTA

6 September 2022

In our long-established Power Pivot Principles articles, we continue our series on the A to Z of Data Analysis eXpression (DAX) functions.  This week, we look at COUNTA.

 

The COUNTA function

This function counts the number of rows in a specified column that contain non-blank values.

The COUNTA function employs the following syntax to operate:

COUNTA(column)

The COUNTA function has just the one argument:

  • column: this is required and represents the column (field) containing the values to be counted

It should be further noted that:

  • when the function finds no rows to count, it returns a blank
  • unlike COUNT, COUNTA supports the Boolean (TRUE / FALSE) data type
  • this function is not supported for use in DirectQuery mode when used in calculated columns or row-level security (RLS) rules.

Consider the following Table called Example, with just the field, List:

Let’s create a simple measure:


Come back next week for our next post on Power Pivot in the Blog section.  In the meantime, please remember we have training in Power Pivot which you can find out more about here.  If you wish to catch up on past articles in the meantime, you can find all of our Past Power Pivot blogs here.

Newsletter