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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.