Forum Discussion
COUNTA function is counting blank cells as well
Did anyone notice that COUNTA DAX function is counting blank cells in the column as well? Microsoft's documentation says it counts the number of cells in a column that are not empty. Any idea what's happening? The column I am counting has text data type.
that's what is looks like, and only reason you need to do that because you are using COUNTA or similar function which doesn't count BLANK otherwise you can always put condition in your measure to check for whitespace and blank() but replace can be more elegant solution.
10 Replies
- parry2k
Super User
chandakaushik can you share sample dataset, what you are trying to do and what is not working? If it actually BLANK() or empty value in text field.
here is post on more detail on BLANK
- chandakaushik
Helper I
parry2k I entered the data directly in PBI Desktop using "Enter Data" . Here is the sample dataset.
When using COUNTA on address column, it gives me a count of 10 while there are only 6 values in the column. I tried using ISBLANK function on address column, it gives me FALSE for each value.
- Nathaniel_C
Community Champion
That is interesting. I am getting the same results, however if I load a table from Excel, the counta function works as expected, or rather Excel does not load anything into a blank cell.
Nathaniel