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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

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

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')

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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