Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

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
v-qiuyu-msft
Community Support

Hi @Daxel

 

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

 

Best Regards,
Qiuyun Yu

v-qiuyu-msft
Community Support
Status changed to: Accepted
 
v-qiuyu-msft
Community Support

Hi @Daxel

 

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

 

Best Regards,
Qiuyun Yu