cancel
Showing results for 
Search instead for 
Did you mean: 

Null value and empty string should both account for Blanks using DAX function COUNT

I would expect COUNT and COUNTBLANK  to calculate the complementary rows within a column: non-blanks values versus blank values.

Therefore, COUNTROWS = COUNT + COUNTBLANK.

 

Expected behavior:

Both null value and empty text string value should be considered a Blank value by both functions.

 

Observed behavior:

COUNTBLANK considers both null and empty value as blanks.

COUNT considers only null value as blanks.

 

The following Table with a text field has an empty string value and a NULL value.

Capture1.PNG

 

Total Rows = COUNTROWS('Table') = 4
Blanks = COUNTBLANK('Table'[Text]) = 2
Non-Blanks = COUNT('Table'[Text]) = 3
 
Is this a known issue with COUNT (and COUNTA) functions?
Or can you explain why both functions do not manage empty text value the same way?
 
Thanks
Julie
Status: Accepted
Comments
Moderator

Hi @Daxel

 

I have reported this issue internally: CRI 135118692. Will update here once I get any information. 

 

Best Regards,
Qiuyun Yu

Moderator
Status changed to: Accepted
 
Moderator

Hi @Daxel

 

This is by design. This is how Excel functions were designed and DAX inherited the behavior from there.

 

Best Regards,
Qiuyun Yu