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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
scottz
New Member

CountA is counting blanks... ...and so is Countblank

Basically the title.  I have a very large table so it wouldn't be practical to post it here, but I am just doing a simple 

Delivered Count = COUNTA('Weekly Reports'[Delivered]
and it's counting all the cells in the column.  Okay-- probably means there some data there I don't see.  Well fine then, I change the formula to:
Delivered Count = COUNTBLANK('Weekly Reports'[Delivered]
and it counts the blanks perfectly.  
 
What in the world is going on?  How can one formula fail and the other work?
1 ACCEPTED SOLUTION
V-lianl-msft
Community Support
Community Support

Hi @scottz ,


Yes, please replace the blank ("" or " ")with null.

Vlianlmsft_0-1647846085725.pngVlianlmsft_1-1647846113134.png

 


Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
V-lianl-msft
Community Support
Community Support

Hi @scottz ,


Yes, please replace the blank ("" or " ")with null.

Vlianlmsft_0-1647846085725.pngVlianlmsft_1-1647846113134.png

 


Best Regards,
Liang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

scottz
New Member

So, I think I follow now.  Empty=null, Empty =/= blank.  So CountA needs a null, not a blank for the function to correctly not count that cell.  So if I did 'replace values' in powerquery and changed <blank> to null that solves my problem?

@scottz , in power query replace null with say NA

 

null should be all small caps

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
amitchandak
Super User
Super User

@scottz , COUNTA - The COUNTA function counts the number of cells in a column that are not empty

so that will leave blank

https://docs.microsoft.com/en-us/dax/counta-function-dax

 

Try countrows('Weekly Reports')

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.